using BeginTransaction
414151Feb 4 2004 — edited Feb 5 2004I am using ODP in .net
I get the following compile error
Property or Indexer 'Oracle.DataAccess.Client.OracleCommand.Transaction' Cannot be assigned to - 'it is read only
Oracle.DataAccess.Client.OracleTransaction otUsers;
// create an instance of the connection object
Oracle.DataAccess.Client.OracleConnection objC =
new Oracle.DataAccess.Client.OracleConnection(DL.getConnectString());
// Open the connection
objC.Open();
//Start Transaction
otUsers = objC.BeginTransaction();
//create an instance of the command object giving the procedure name
Oracle.DataAccess.Client.OracleCommand objCommand =
new Oracle.DataAccess.Client.OracleCommand("pgk_MGR.lockUser");
objCommand.Connection = objC;
//assign Transaction
objCommand.Transaction=otUsers;
The error is on the last line