Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    145

    Unanswered: ADO rollback transaction

    I'm using Access 2003 and ADO 2.1 (I think). I'm using transactions. Is there a way to test if a transaction has started? Right now if an error occurs I simply close the ADO connection and it rolls back the transaction.

    This might be okay, but it seems like there would be a way to first see if the transaction has even been started. If so then roll it back.

    My thought was to check the connection state, but I don't see anything that specifically pertains to a transaction.

    Thanks,
    Gunner
    GG
    Code:
    On Error Goto Hell
    
    Hell:
        Msgbox("An error occurred, but was sent to Hell. You may continue.")

  2. #2
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    Whenever you start a transaction, set a global variable so you will know there is a transaction started. Of course, when the transaction is completed, you will need to set the global variable to reflect that status too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •