Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie client/server question, SQLEXEC() syntax for AS40
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00125846
Message ID:
00126638
Vues:
16
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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform