Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update from VFP to AS400
Message
 
À
25/01/1999 11:25:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00179216
Message ID:
00180183
Vues:
30
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform