ankit paul
ankit paul

Reputation: 81

SQL Server throws error in trigger "Transaction doomed in trigger. Batch has been aborted."

insert into tuseractivitytrack (TrackIndustryId,tracktype) values(null,'news')

When I insert a null value to a column it gives error now what i have done i have put the code of substring in try catch block but still if a error generated it generate a error and the rows does'nt get inserted

Upvotes: 0

Views: 2337

Answers (1)

Shantanu Gupta
Shantanu Gupta

Reputation: 21198

You need to use savepoint inside trigger rather than transaction. Can you please provide code

http://msdn.microsoft.com/en-us/library/ms187844(v=SQL.90).aspx

TSQL: Try-Catch Transaction in Trigger

Upvotes: 1

Related Questions