PDA

Click to See Complete Forum and Search --> : ADO Transaction


dabaraham
May 28th, 2000, 12:04 PM
How do you check if an ADO transaction is open?

I issued a connection.BeginTrans, and in a subsequent statement I want to check if I have an open transaction.
Is there a property that I can test, or do I have set a boolean flag and test the boolean.

Thanks,

DA

SkippySolutions
May 30th, 2000, 10:02 PM
Straight From the Manual:

level = object.BeginTrans()

...

For providers that support nested transactions, calling the BeginTrans method within an open transaction starts a new, nested transaction. The return value indicates the level of nesting: a return value of "1" indicates you have opened a top-level transaction (that is, the transaction is not nested within another transaction), "2" indicates that you have opened a second-level transaction (a transaction nested within a top-level transaction), and so forth. Calling CommitTrans or RollbackTrans affects only the most recently opened transaction; you must close or roll back the current transaction before you can resolve any higher-level transactions.

Hope this helps...