>Michael,
>
>Thanks for the reply. I thought the SQL Update would be easiest, but I receive an error. It is expecting my AS400 file to be in the VFP dbc. Here is my code:
>
>CREATE CONNECTION .....
>
>SQLEXEC(lnHandle, "SELECT * FROM QS36F.GMBIAP6 GMBIAP6;
> WHERE GMBIAP6.WDC=' ' AND GMBIAP6.WSBTC = ' '", 'cRefunds')
>
>UPDATE QS36F!GMBIAP6 SET GMBIAP6.WSBTC = 'Y'
>
>SQLDISCONNECT(0)
>
>DELETE CONNECTION .....
>
>
>What am I doing wrong? Thanks again for your help! :)
Remember you are using SQL passthrough to a remote data source. You must send the update via SQLEXEC.
SQLEXEC(lnHandle, "UPDATE QS36F.GMBIAP6 SET GMBIAP6.WSBTC = 'Y'")
Your above update would update the entire database by the way. You need to include a WHERE clause (as the one in your initial select) to update only the records returned by your select statement.
Regards,
Mike
Michael McLain