Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT and Transactions...
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00888894
Message ID:
00888924
Views:
8
This message has been marked as the solution to the initial question of the thread.
Michael,

Yup. You might want to consider naming the transaction, just in case any of those processes you call have any embedded transactions (or get them sometime in the future) within them.
=SQLEXEC(THIS.oSqlconnection.nConnHandle,"BEGIN TRANSACTION supertrans")
when you commit or rollback you provide the same transaction name in the command.

>Do I have this right?
>
>
>=SQLEXEC(THIS.oSqlconnection.nConnHandle,"BEGIN TRANSACTION")
>THIS.oFromWarehouse.Dotransfer()
>THIS.oToWarehouse.Dotransfer()
>THIS.UpdateCounters()
>THIS.Makexfer()
>THIS.AddVelocity()
>IF THIS.lSuccess
>	=SQLEXEC(THIS.oSqlconnection.nConnHandle,"COMMIT TRANSACTION")
>ELSE
>	=SQLEXEC(THIS.oSqlconnection.nConnHandle,"ROLLBACK TRANSACTION")
>ENDIF
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform