Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on Transaction Process
Message
 
À
14/10/1998 12:47:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00146723
Message ID:
00146737
Vues:
20
>Hi,
>
>Is "Begin Transaction" process only applied to the system that build by the project? and is it work with the indexed table?
>
>Thank you

Aston,

Transactions only work with tables that are part of a Database container. They work whether there is a project or not. After a BEGIN TRANSACTION is issued all changes to all tables are not done immediately, instead the necessary locks are obtained. When END TRANSACTION is encountered all of the operations in the transaction are committed, if ROLLBACK is encountered then the entire transaction is discarded and the tables do not get updated.

If the system crashes during a transaction, none of the tables will have been updated.

It is a very good idea to keep BEGIN TRANSACTION and END TRANSATION/ROLLBACK as close to each other in the code as is possible to limit the amount of time that system resources are kept locked. Do all your calculations and stuff first, then BEGIN TRANS, do the TableUpdates() and finally END TRANS or ROLLBACK as appropriate.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform