Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Handling in Transactions
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00694172
Message ID:
00694252
Views:
14
What you'll probably want to do is start some nested trasactions. Start a transaction in each stored proc, if it failes just rollback that transaction only, then return 0. The sp that called it can pick up that returnd 0 and roll back its transaction.

Check the BOL for nested transactions.

HTH
Eric

>Hi All,
>
>I have several stored procedures that have nested SP calls. I want to make sure all transactions are rolled back in case of an error along the way. Where each separate SP may have a BEGIN TRAN statement...
>
>What is the best way to handle @@ERROR when one SP may call another SP?
>
>TIA,
>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform