When using VFP with ODBC on the AS/400 I have tried the following:
CREATE CONNECTION NCCCIMP DATASOURCE "AS400"
lnHandle2 = SQLCONNECT('ncccimp')
SQLEXEC(lnHandle2, 'SELECT Stchsp.R9NMID, Stchsp.R9CQAA, Stchsp.R9CMAA, Stchsp.R9B1AA, Stchsp.R9B2AA, Stchsp.R9B3AA, Stchsp.R9B4AA;
FROM NCCCMFIL.STCHSP Stchsp;
WHERE Stchsp.R9CQAA = '1998';
ORDER BY Stchsp.R9CQAA, Stchsp.R9CMAA, Stchsp.R9B1AA', 'MyCursor')
When executed in a prg the WHERE portion has a function name missing. However is I change the line to WHERE Stchsp.R9CQAA = "1998" the AS/400 doesn't like it. How can I get around this?
TIA,
Rex
Rex A. Willis MCSD