pankaj.kuchaliya (9/22/2010)
when the trigger is fire then it display the "The transaction ended in the trigger. The batch has been aborted".Please help me.
Everything within a trigger--including calls to stored procs and dynamic SQL--participates in the same transaction as the event that triggered it. If any of those issues a GO or COMMIT WORK it will prematurely end the main transaction causing this error message. The same thing will happen if you issue a COMMIT TRAN without creating a corresponding subordinate transaction.
If you are using dynamic SQL, you CANNOT use GO statements within your dynamic SQL. If your stored proc is issuing a COMMIT, you probably haven't created a subordinate transaction.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA