Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transactions & Sqlcommit ???
Message
 
À
30/08/2001 10:46:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00550831
Message ID:
00550894
Vues:
11
SQLRollback and SQLCommit are used only when you are talking to a database other than VFP.

You must use BEGIN TRANSACTION in order to use ROLLBACK or END TRANSACTION. Note VFP does not have a COMMIT command, in VFP you use END TRANSACTION instead.

From my previous example, just remove the calls to SQLExec() and that should work for VFP databases.

>Hi Hector,
>
>Thanks for the reply. I am not using SQL SERVER or ORACLE just a straight VFP database on the local server. Do I still need the BEGIN TRANSACTION ?
>
>I hoped I could just do:
>
>SELECT cursor1
>lUpdtOk = TABLEUPDATE(.T.)
>IF !lUpdtOk
> SQLROLLBACK(nMyHndl)
> MESSAGEBOX(advise user)
> RETURN
>ENDIF
>
>SELECT cursor2
>lUpdtOk = TABLEUPDATE(.T.)
>* Repeat for all cursors
>ETC…
>
>* If I made it here. All went well.
>* Issue this and the data is officially updated here.
>SQLCOMMIT(nMyHndl)
>
>Mike
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform