Link to home
Start Free TrialLog in
Avatar of Keith McElroy
Keith McElroy

asked on

AS/400 ODBC Connection

Running a vb script to create an Access database from AS/400 data and getting an err, yet the table is in the system:

Screenshot with error, AS/400 screen and the script:

http://www.screencast.com/t/Nk6ukzq9r

I think the sql select statement is the point of failure.
How am I supposed to write the select statement?
Am I missing something/
Avatar of Member_2_2484401
Member_2_2484401
Flag of United States of America image

It looks like you're using a "naming convention" of *SQL, so the database is looking for tables in a schema called NORMANR (which is probably you're user-id).

The easiest and quickest solution would be to qualify the table-name with the schema (library) where the table lives.

e.g.
SELECT DISTINCT GMFUND from MySchema.GM200AP WHERE GMFYR = '14'

(Of course, replace "MySchema" with the library-name on your system.)

HTH,
DaveSlash
ASKER CERTIFIED SOLUTION
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Keith McElroy
Keith McElroy

ASKER

Really helpful.
This naming thing causes headaches for the vast majority of folks when they first start with ODBC/JDBC/OLEDB/ADO.NET database connectivity to IBM i DB2 - including me.