This OracleTransaction has completed; it is no longer usable

G

Guest

I am working on a VB.NET console app that creates a database connection
(using System.Data.OracleClient) and then does a BeginTransaction on that
connection. Then I create an instance of a class, passing this connection
object to the constructor of that class, and the class uses the connection
while doing a variety of duties...

When everything is done and I am back in the console app, I do a Commit() on
that connection object, and I get (every time):

An unhandled exception of type 'System.InvalidOperationException' occurred
in system.data.oracleclient.dll
Additional information: This OracleTransaction has completed; it is no
longer usable.

I've traced the connection thru all the various tasks, and it always has a
state of Open, and TransactionStarted is always True, right on up to the
Commit!

What could be happening to the transaction? Thanks for any pointers...
 
G

Guest

Oops - never mind. It turns out that the app's data layer had some logic that
would close the connection in some (business) cases. The connection being
closed caused the transaction to be implicitly rolled back...

All is OK now
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top