S
Sanjay
Hi
I'm trying to use OracleConnection.BeginTransaction() to create an
OracleTransaction object to assign to the transaction property of my
OracleCommand object. I get this exception ...
"Execute requires the Command object to have a Transaction object when
the Connection object assigned to the Command is in a pending local
transaction. The Transaction property of the Command has not been
initialized."
Stack Trace ...
at System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean isReader, Boolean
needRowid, OciHandle& rowidDescriptor, ArrayList&
refCursorParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean needRowid,
OciHandle& rowidDescriptor)
at
System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean
needRowid, OciHandle& rowidDescriptor)
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
at System.Data.OracleClient.OracleTransaction..ctor(OracleConnection
connection, IsolationLevel isolationLevel)
at
System.Data.OracleClient.OracleConnection.BeginTransaction(IsolationLevel
il)
at MyApp.MyMethod()
It seems to be internally calling OracleCommand.ExecuteNonQuery() which
requires a transaction object !
Is there any way around this problem?
Thanks.
- Sanjay
I'm trying to use OracleConnection.BeginTransaction() to create an
OracleTransaction object to assign to the transaction property of my
OracleCommand object. I get this exception ...
"Execute requires the Command object to have a Transaction object when
the Connection object assigned to the Command is in a pending local
transaction. The Transaction property of the Command has not been
initialized."
Stack Trace ...
at System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean isReader, Boolean
needRowid, OciHandle& rowidDescriptor, ArrayList&
refCursorParameterOrdinals)
at System.Data.OracleClient.OracleCommand.Execute(OciHandle
statementHandle, CommandBehavior behavior, Boolean needRowid,
OciHandle& rowidDescriptor)
at
System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean
needRowid, OciHandle& rowidDescriptor)
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
at System.Data.OracleClient.OracleTransaction..ctor(OracleConnection
connection, IsolationLevel isolationLevel)
at
System.Data.OracleClient.OracleConnection.BeginTransaction(IsolationLevel
il)
at MyApp.MyMethod()
It seems to be internally calling OracleCommand.ExecuteNonQuery() which
requires a transaction object !
Is there any way around this problem?
Thanks.
- Sanjay