Checking if a transaction has already been started.

  • Is there a way to check if the current connection already has started a transaction (BeginTrans)?

    Thanks for any help.

  • You might want to be little more specific.  Are you running this from a GUI and need something passed to let the client know?  Are you running this from Query Analyzer?  In that case, you could try PRINT 'TRANSACTION STARTED' beforehand.  But if your Transaction is wrapped in a cursor or loop, you may not get that back to screen until whatever it is wrapped within completes....

    I wasn't born stupid - I had to study.

  • I was actually trying to do it from VB 6.0.  But I just found a property in one of our custom DataConnetion dll's that solves my problem.  Sorry for the wasted email.  Thanks for your help!

  • you could check @@transcount in TSQL

     


    * Noel

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply