Re: help - transaction control
From: roger (xrsr_at_rogerware.com)
Date: 07/14/04
- Next message: Anith Sen: "Re: Help with basic query please"
- Previous message: Wayne Wengert: "Re: Why Am I Getting This Error"
- In reply to: Andrew J. Kelly: "Re: help - transaction control"
- Next in thread: Andrew J. Kelly: "Re: help - transaction control"
- Reply: Andrew J. Kelly: "Re: help - transaction control"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Jul 2004 15:21:04 GMT
"Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in
news:#D8$ujaaEHA.752@TK2MSFTNGP09.phx.gbl:
> Roger,
>
> Yes transactions are nested but will always depend on the outer most
> transaction to successfully commit before any of the inner ones are
> committed. If a Rollback is issued anywhere along the way ALL
> transactions are immediately rolled back. This is be design and is
> how it has always worked. So that is why it is imperative that before
> you issue a Commit or Rollback you check the @@TRANCOUNT variable to
> see if there is an open tran and avoid these errors.
>
> IF @@TRANCOUNT > 0
> COMMIT TRAN
>
> or
>
> IF @@TRANCOUNT > 0
> ROLLBACK TRAN
>
>
>
That doesn't affect what I'm seeing.
I am calling rollback tran from inside my SP, which
has begun a nested transaction, noting that @@trancount is 2
before calling rollback tran, and that is when I get
the error message that I mentioned.
- Next message: Anith Sen: "Re: Help with basic query please"
- Previous message: Wayne Wengert: "Re: Why Am I Getting This Error"
- In reply to: Andrew J. Kelly: "Re: help - transaction control"
- Next in thread: Andrew J. Kelly: "Re: help - transaction control"
- Reply: Andrew J. Kelly: "Re: help - transaction control"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|