Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SPT and Transactions...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00888894
Message ID:
00888924
Vues:
9
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform