Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

problem with ODP.NET and transactions

302366Jul 3 2002
Having a problem with the ODP.NET data provider when using transactions. Here is a simple example to reproduce the problem.

OraConnection LConnection = new OraConnection();
try
{
LConnection.ConnectionString = "<Your data here>";
LConnection.Open();
OraTransaction LTransaction = LConnection.BeginTransaction();
OraCommand LCommand = LConnection.CreateCommand();
LCommand.CommandText = "create table Test ( id int not null primary key )";
LCommand.Transaction = LTransaction;
LCommand.ExecuteNonQuery();
LTransaction.Commit();
}
finally
{
LConnection.Dispose();
}

This example throws an InvalidOperatorException when the transaction is committed. This same sequence of commands works with other ADO.NET data providers.

Has anyone seen this? Is this a known issue, or am I doing something wrong.

Thanx,
Bryn Rhodes
Alphora

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 31 2002
Added on Jul 3 2002
3 comments
201 views