Hi all,
I have a trigger which has a try/catch block. In the try block there is a write to a user-defined log file. What I need to do is allow the table update (on which the trigger is based) to commit, but I need the ability to bail on the log update--it's important but less so than the main table.
But if I do a rollback in the Catch block, it rolls back the main table update as well as the logfile update. Is it possible to do a Commit prior to the attempted logfile write in the try/catch block, even though there is no explicit Begin Tran?
--Jim
I have a trigger which has a try/catch block. In the try block there is a write to a user-defined log file. What I need to do is allow the table update (on which the trigger is based) to commit, but I need the ability to bail on the log update--it's important but less so than the main table.
But if I do a rollback in the Catch block, it rolls back the main table update as well as the logfile update. Is it possible to do a Commit prior to the attempted logfile write in the try/catch block, even though there is no explicit Begin Tran?
--Jim