SQL queries to AS/400 
Author Message
 SQL queries to AS/400
I am writing a program that does a simple SQL query to an AS/400 through NetSofts ODBC driver.

The query is similar to this:

select * from mtfdta/pcinfo where awcnum = "123456"

In MS-Access 2.0 this query works fine and returns a record set.  But under Delphi the query will return
an empty record set.  Does anyone have any idea why this would be occurring??

Thanks
Jason



Mon, 06 Jul 1998 03:00:00 GMT
 SQL queries to AS/400


writes

Quote:
>I am writing a program that does a simple SQL query to an AS/400 through
>NetSofts ODBC driver.

>The query is similar to this:

>select * from mtfdta/pcinfo where awcnum = "123456"

>In MS-Access 2.0 this query works fine and returns a record set.  But under
>Delphi the query will return
>an empty record set.  Does anyone have any idea why this would be occurring??

Access does a large amount of conversions between the various data types
in the background (AFAIK). If, as suggested by the name of the variable,
awcnum is numeric you might try

SELECT * FROM mtfdta/pcinfo WHERE awcnum = 123456

Delphi performs no explicit type conversion (AFAIK) as it is a strongly
typed language, Access, VB, etc. and not strongly typed and so the
results may vary.

--

"Programming is mirroring the world, inside a computer"   Larry O'Brien 1991



Mon, 06 Jul 1998 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Programming the AS/400 (Delphi/400 vs LightLib/400 (EasyCom)

2. Dynamic SQL for DB2/400 from RPG and/or Rexx/400

3. AS/400 DB2/400

4. US-NC- AS/400 Programmer (AS/400 RPG COBOL Year 2000) DB Basics, Inc.#185

5. Rexx/400-DB2/400 ExecSQL/SQLCode -5032

6. AS/400, anyone used Delphi to access DB2/400

7. AS/400 - Seeking info on using VB to access DB2/400

8. AS/400 DB/400 Gateway?

9. Oracle Transparent Gateway to AS/400 - processes on AS/400


 
Powered by phpBB® Forum Software