How do I use transactions over multiple stored procedures?
Can you start a transaction in one stored procedure and then roll it back or commit it in a nested procedure? gbn Commit and rollback have different effects COMMIT decrements @@TRANCOUNT ROLLBACK pushes it back to zero This happens because SQL Server does not really support nested transactions. If you commit or rollback in a nested stored proc (not transaction), then you'll generate error 266 because of a @@TRANCOUNT mismatch on start and entry The rollback issue can be resolved by using SET XACT_ABORT ON which is "auto rollback" (simply) and suppresses error 266. The commit issue... you can't