> > Anyone have an example of how to trap and exception within a T-SQL > transaction and save diagnostic details on why the transaction failed to > an error log? If you insert the exception data to an error table this > information gets lost when you rollback the transaction. I'm sure I'm > missing something obvious :)
Yes, you log into a variable, roll back the transaction in the CATCH block and then insert the variable into the error log table. -- Christof _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

