Page 1 of 1

Null-access exception

Posted: Fri 20 Jan 2006 19:18
by Demigor
I get strange exception using OraDirect.NET 3.2.

using (OracleConnection conn = new OracleConnection(connection))
{
using (OracleTransaction trans = conn.BeginTransaction())
{
// making some DB-changes

trans.Commit(); <<<< after commit here
}
}

Looks like Dispose method is buggy for both OracleConnection & OracleTransaction classes.

Posted: Wed 25 Jan 2006 09:49
by Paul
We reproduced your problem and fixed it. This fix will be included in the next OraDirect .NET build.
As a workaround you can avoid writing "using" clause or Dispose() for OracleTransaction. OracleTransaction.Commit() method calls OracleTransaction.Dispose() inside.