KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a try catch block in my SP with just a insert statement in the try. The catch checks the error code to see if it is PK violation, if it is then do an update. But sometimes I get and error: The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction. Uncommittable transaction is detected at the end of the batch. The transaction is rolled back. So I added xact_abort on , but then I keep getting: Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. And I found this Set-XACT_ABORT-ON-and-TryCatch-block-in-Sql-Server-2005 , which if true, will my catch code not run if there is a error in my try block with xact_abort on ?
Tags (comma-separated)
Save Edits
Cancel