Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Records update for SQL
Message
From
22/11/2002 15:54:30
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00723076
Message ID:
00726002
Views:
12
Daniel,

PMFJI, I do chain/batch commands with SQLExec() all the time, and I never use the semicolon to "chain" the commands.

This is the way I would have done it.
TEXT TO lcSQL TEXTMERGE NOSHOW
update table set x = y where <<condition>>
select @@rowcount as rowcount
ENDTEXT
*&
= sqlexec(liConnection, lcSQL, curResults)
And my question is, are we doing to same thing? Or they're different?

Hope you understand my question.

TIA.


Wan



>>Dear Vlad Grynchyshyn,
>>
>>Thank you for your help and I tested. It returned no. of records processed using VFP Native SQL Command. When I use SQLExec to issue the SQL command via ODBC, it can't. Do you know have any way to return no. of records processed? Thanks a lot....
>>
>>Best Regards,
>>
>>Justy Chow
>
>
>You can use the @@ROWCOUNT system variable to get this provided you execute it immediately after the update. So, you'd do something like this in VFP:
>
>
>=sqlexec(liConnection,"update table set x = y where {condition};" + ;
>   "select @@rowcount as rowcount",curResults)
>?curResults.rowcount
>
>
>The trick is "chaining" the commands together. The semicolon in the middle of the command string does that.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform