Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sqlexec -- determing success
Message
De
15/02/2000 11:13:19
 
 
À
15/02/2000 11:00:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00332223
Message ID:
00332231
Vues:
13
If you are proficient in TSQL and SQL Server, you could put this update into a stored procedure and return a value from that procedure to indicate update/no update. Then you would use SQLEXEC from VFP to call that procedure instead of the direct update.

>I am doing a Microsoft SQL update using SQLEXEC. The update statment is written in such a way as to update one record if the copy residing on SQL server has undergone no changes since downloads, or to update zero records if there has been such as change.
>
>My problem: Since this is an update rather than a select statement no SQLresult cursor is created. And since the syntax is right regardless of whether one or zero records are updated, the return value of SQLEXEC is always 1.
>
>So how do I tell whether zero o no records were updated after running the SQLEXEC statement?
>
>Thanks
>
>Gar
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform