Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to verrify an Insert into using Sqlexec
Message
De
28/04/2000 13:15:56
 
 
À
27/04/2000 23:06:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00363680
Message ID:
00364567
Vues:
39
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform