Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transaction processing
Message
De
31/01/2003 13:21:00
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Transaction processing
Divers
Thread ID:
00747752
Message ID:
00747752
Vues:
49
I've been using Transaction processing (BEGIN TRANSACTION, END TRANSACTION, ROLLBACK) for a while now, but still not sure I fully understand when, why, and how to use it properly. Specifically, why would I use nested transactions? Also, is there a limit to the number of updates within a transaction.

For example, suppose I have a batch of 5000 items to be processed. Each of the items is processed and then marked as "done" by a logical flag. At the end of my processing, I also want to update the batch header record with some information. However, if one item could not be processed, I want to rollback the entire thing, including the update to the batch header. Is it okay to include all 5000 item updates plus the batch header update in a single transaction? BTW, "5000" was an arbitrary number - could by more, could be less.

Thanks,
Alan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform