Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ROLLBACK in error handler and cleanup
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00345556
Message ID:
00345619
Views:
21
Hi Bret,
I ran into this problem with a DO WHILE loop and had to take the Rollback out. It seemed to me that your BEGIN TRANS and ROLLBACK commands have to be at the same 'nesting' level. Have you tried a for/next loop? Does it give you the same problem?

And if not you may have to use an IF/Endif construction to check. Luckily you can only have 6 levels.

HTH
Barbara

>I put this code in my error handler and also in my cleanup code:
>
>DO WHILE TXNLEVEL() > 0
>	ROLLBACK
>ENDDO
>
>
>It seems like a good idea to me. I had been getting errors following other errors that said "command cannot be used within a transaction" or something. Can anyone see a problem with what I have? There's a lot I don't know about proper error handling.
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform