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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rolling back transactions when page stops executing

Status
Not open for further replies.

shweta

Technical User
Mar 20, 2001
27
US
Hi,

I have this code snippet on a page:

<beginning of code>

<%@ TRANSACTION = Required%>

objConn.Execute sqlstmt

if objCOnn.Errors.count>0 then
ObjectContext.SetAbort

<end of code>

Now... if I lock the table thru the SQL query analyzer, and I try to execute an update on that table fom ASP, the page keeps spinning because it cannot get to the row in the table. So I stop the page. Now, if I read uncommitted data on the table it has not updated the row. But as soon as I release the lock on the table the data is updated. It's almost as if the transaction was kept alive even after the page stopped executing.

So my questions is...is there anyway to rollback the transaction once the ASP page stops executing?

Any help/insight would be appreciated.

Thanks
Shweta
 
I'm not shure if you can do that.
You cant knw when the user click stop or something.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top