Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update from VFP to AS400
Message
 
 
To
25/01/1999 11:25:20
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00179216
Message ID:
00180183
Views:
31
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform