Re: help - transaction control
From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 07/14/04
- Next message: Rajesh Peddireddy: "Re: surely, there's got to be a better way"
- Previous message: kirk1880: "RE: Need some help with simple search query"
- In reply to: roger: "Re: help - transaction control"
- Next in thread: Viviana: "Re: help - transaction control"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Jul 2004 12:09:24 -0400
This message is informational only and does not affect the execution of the
batch. Take a look at 266 in BooksOnLine and see if that helps.
-- Andrew J. Kelly SQL MVP "roger" <xrsr@rogerware.com> wrote in message news:Xns9526556AF74FErsrrogerwarecom@204.127.199.17... > "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: Rajesh Peddireddy: "Re: surely, there's got to be a better way"
- Previous message: kirk1880: "RE: Need some help with simple search query"
- In reply to: roger: "Re: help - transaction control"
- Next in thread: Viviana: "Re: help - transaction control"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|