Hi,
I am using SQL2000. I have existing Stored Procedures that need to log the run-time errors by checking @@Error using one InsertError SP. The SP InsertError curretly stores the Error message into the server's EventViewer. I would like to change it to store the error message to an Error table in the database.
However, the stored procedures that call the InsertError SP might have transaction wrapped. Once there is an error, the caller would Roll Back the transaction right after logging the Error (calling InsertError). If I change the InsertError to insert to table , then the roll back would roll back the insertion to the Error table too.
Is there any way that like in Oracle "Atomit Transaction" , that without touch the callers code, I can let the InsertError commited but the rest of the transaction rolled back?
Thanks!
OmniNews
I am using SQL2000. I have existing Stored Procedures that need to log the run-time errors by checking @@Error using one InsertError SP. The SP InsertError curretly stores the Error message into the server's EventViewer. I would like to change it to store the error message to an Error table in the database.
However, the stored procedures that call the InsertError SP might have transaction wrapped. Once there is an error, the caller would Roll Back the transaction right after logging the Error (calling InsertError). If I change the InsertError to insert to table , then the roll back would roll back the insertion to the Error table too.
Is there any way that like in Oracle "Atomit Transaction" , that without touch the callers code, I can let the InsertError commited but the rest of the transaction rolled back?
Thanks!
OmniNews