Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Transaction processing
Message
From
30/09/2004 06:36:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Transaction processing
Miscellaneous
Thread ID:
00947456
Message ID:
00947456
Views:
61
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.
Next
Reply
Map
View

Click here to load this message in the networking platform