Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to do transactions
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Best way to do transactions
Divers
Thread ID:
00479478
Message ID:
00479478
Vues:
49
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform