Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transactions & Sqlcommit ???
Message
 
To
30/08/2001 10:46:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00550831
Message ID:
00550894
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform