Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie client/server question, SQLEXEC() syntax for AS40
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00125846
Message ID:
00126768
Views:
23
(heh, heh...) how do I determine that? Remember I said I'm a non-AS400 type. Everything I know about the AS400 is pulled out of the on-line help for the ODBC driver I'm using (Walldata's Rhumba BTW). If you've got any knowledge to share I'd be more than happy to drain you of some of it :-)

>Are you using DB2?
>
>>I found some example code for AS400 sql in the archives. Turns out the SQL needs to reference the library and filename in the following manner:
>>
>>'select * from DBASE2.HMPTKMSZ HMPTKMSZ'
>>
>>where dbase2 is the library of the file. You then need to repeat the filename (table for us non-AS400 types)
>>
>>Strange but it works.
>>
>>>Use AERROR right after the sqlexec and look at the error message. That should tell you what's wrong.
>>>
>>>>I've just created a connection to an AS400 but I'm having trouble issuing a simple SQLEXEC() to test it out. I'm getting back valid handles when I issue SQLCONNECT(). It appears that it doesn't like the syntax I'm passing in my SQL statement:
>>>>
>>>>lnResult=sqlexec(lni, "Select * FROM HMPTKMSZ")
>>>>
>>>>where lni is a valid connection handle. HMPTKMSZ is a valid table. I was able to verify that with SQLTABLES(). I tried "SELECT * from BMC2!HMPTKMSZ" where bmc2 is the table qualifier that SQLTABLES() returns, that didn't work either. Does anyone know how to reference a table on the AS400?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform