Created
November 5, 2013 14:21
-
-
Save gscattolin/7319709 to your computer and use it in GitHub Desktop.
Transaction with RollBack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET XACT_ABORT ON | |
| BEGIN TRY | |
| BEGIN TRANSACTION | |
| --work code here | |
| COMMIT TRANSACTION | |
| END TRY | |
| BEGIN CATCH | |
| ROLLBACK TRANSACTION | |
| --cleanup code | |
| END CATCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment