Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Define statement to commit regardless of current transactions

Status
Not open for further replies.

Brit

Programmer
May 15, 2001
15
US
OK I checked the FAQ section first this time (sorry for last time) and I didn't see anything on this.

I have a stored procedure that has a few transactions. At the beginning of the transaction we add a record to a history table and at the end if no rollbacks we update the record.

This works well most of the time, we have a quick log of how often the stored procedure is run and how often the stored procedure runs successfully.

However, it appears that sometimes there is a larger transaction that rolls back the entire stored procedure and pulls out the record in our history table.

Is there a way to define a section of code as running "outside of all transactions" so it won't be rolled back? I guess I could write to a log file, but I am hoping to have the data in a table.

thaks again for all your help,

Brit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top