Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transaction processing
Message
De
30/09/2004 06:36:08
 
 
À
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:
00947456
Message ID:
00947456
Vues:
59
I did some tests about transaction processing on VFP 8.0, and I have been a little surprised to see that if I begin a transaction, then some runtime error occurs in my procedure before I ended the transaction, the transaction is not automatically rollbacked and is still pending. This means that a further END TRANSACTION could very well commit the failed transaction, or that more unnoticed pending transactions may get the TXNLEVEL() over 5 and generate an error.
How do expert Foxpro developers handle this ? Is this the reason for which I see many blocks like the following in my book's examples ?
DO WHILE TXNLEVEL()>0
ROLLBACK
For the moment I am tempted to include every transaction in a TRY...CATCH block, so that I can issue a ROLLBACK in the CATCH block.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform