Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to do transactions
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Best way to do transactions
Miscellaneous
Thread ID:
00479478
Message ID:
00479478
Views:
52
Hi,

I am developing a VFP application using a SQL Server 7.0 backend.
Can anyone explain me the difference between the two syntaxes bellow and the implications of using each of them? is there a "right" one?

1. Transactions using VFP functions
lnConnection = SQLCONNECT("MyDataSource", "sa", "")

SQLSETPROP(lnConnection, "Transactions", 2)  
*-- Data manipulation here...
SQLCOMMIT(lnConnection)
2. Transactions using SPT directly against SQL Server
lnConnection = SQLCONNECT("MyDataSource", "sa", "")

SQLEXEC(lnConnection, "BEGIN TRANSACTION")  
*-- Data manipulation here...
SQLEXEC(lnConnection, "COMMIT")
Thank you very much!
-----
Fabio Vazquez
http://www.fabiovazquez.com
Next
Reply
Map
View

Click here to load this message in the networking platform