Tough problem? Rolling back timed out Stored Procedure called from ASP?

M

M Wells

Hi All,

I don't know if this is a truly esoteric question, or not, but I'm
wondering how (or even if) you handle a timeout on a transaction
within a stored procedure executed in a Stored Procedure?

A theoretical example of the stored procedure (sadly, I'm not allowed
to post the actual code):


Create proc sp_testproc @myval int, @outval int OUTPUT as

begin tran

select top 1 @outval= myname from mytable where recid = @myval

update mytable set myname='xxxx' where recid = @myval

commit

select @outval


So, again in theory, I'm executing this stored procedure from an ASP
page.

After executing the stored procedure, I'm testing the ADO connection's
error object for a timeout.

What I'd like to know, is that if the stored procedure times out (ie
ADO.Error.Number = -2147217871) and I issue an ADO.RollbackTrans in
response to that error, will that rollback the transaction contained
within the Stored Procedure?

Many, many, many thanks in advance for any help with this!!

Much warmth,

Murray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top