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

Discussion in 'ASP General' started by M Wells, Mar 3, 2004.

  1. M Wells

    M Wells Guest

    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
    M Wells, Mar 3, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mona
    Replies:
    1
    Views:
    887
    Tu-Thach
    Jun 27, 2003
  2. Steve
    Replies:
    0
    Views:
    5,311
    Steve
    Jul 1, 2003
  3. Mike P
    Replies:
    0
    Views:
    3,274
    Mike P
    Jun 19, 2006
  4. JB
    Replies:
    2
    Views:
    897
    Göran Andersson
    Mar 5, 2010
  5. Mona

    Called a Stored Procedure , decimal parameter

    Mona, Jun 27, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    326
Loading...

Share This Page