Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BEGIN Transaction
Message
 
To
08/10/1999 09:42:51
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00274085
Message ID:
00274251
Views:
36
BEGIN TRANSACTION

** Do whatever insert or ReadComm
IF Not Success
   ROLLBACK
   TABLEREVRT(.T.)
   ENDTRANSACTION
To see how to get the code formatted, replay to this and carefully look for the < pre > and < /pre > tags.

The point of the changes I made were that they removed all calls to outside routines from inside the transaction. With the code you posted there is no way to know what is screwing up the transaction because outside routines are being called and we have no idea what those routines are doing.

This recent code snippet has some basic flaws in it also,

1) ROLLBACK ends a transaction so the END TRANSACTION is redundant and will probably error because there should not be a transaction in process.

Another thing to consider is the triggers of the tables, do they start and end transactions? If they do are those transactions ended properly? What code ran before this code and after it, did that code start and not close a transaction?

The code fragment I sent you will work flawlessly, it will never leave a transaction open, the tablereverts wil work fine. That is as long as something else in your system isn't messing things up on you.
Previous
Reply
Map
View

Click here to load this message in the networking platform