Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sqlexec -- determing success
Message
From
15/02/2000 11:13:19
 
 
To
15/02/2000 11:00:37
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00332223
Message ID:
00332231
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform