Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to verrify an Insert into using Sqlexec
Message
From
28/04/2000 13:15:56
 
 
To
27/04/2000 23:06:17
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00363680
Message ID:
00364567
Views:
44
>Can you give me an example, I am not sure how to use it.
>

nConn = SQLCOnnect( 'MyDataBase' )

SQLExec( nConn, [UPDATE MyTable SET MyField = 'NewValue' WHERE ID='1'] )
SQLExec( nConn, [Select @@ROWCOUNT as nCount], 'curResult' )

Wait Window curResult.nCount + " Records Updated!"

***********
something like that, I may have a syntax above wrong.

BOb


>Thanks Chris
>
>
>No... @@ROWCOUNT contains the number of records affected by the last command sent on that connection. You can also use @@ROWCOUNT to see if a record was updated too.
>
>>Bob,
>>
>>So, what your saying is count the number of records prior to the insert, then count them after? Do you know anything about sqlcommit()? At first glance, this looks like it is what I need.
>>
>>Thanks, Chris
Previous
Reply
Map
View

Click here to load this message in the networking platform