OptimisticConcurrencyException
Posted: Thu 05 Jun 2014 14:35
Hi,
We are using dotConnect for Oracle v8.3.146.0 in our project.
We having problem with the OptimisticConcurrencyException that is thrown in case of concurrency - the StateEntries collection that contains the items that have the problem is empty.
I did a research in Internet but found nothing about the reason that could cause that, so I looked in the code and I saw that you are using the constructor of OptimisticConcurrencyException that takes just a string as parameter:
Is there any special reason to do that?
Is it possible to change it with the constructorso we can get the StateEntries collection and resolve our problem?
Here is the StackTrace:
Devart.Data.Oracle.Entity.dll!Devart.Data.Oracle.Entity.o.a(System.Data.Common.DbCommand A_0, int A_1) + 0x33b bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.dq.m() + 0x1ee bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.dq.j() + 0x191 bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.cr.b() + 0x24a bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.bu.h() + 0x18d bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.bu.c() + 0x184 bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.bu.a(object A_0, Devart.Common.TransactionStateChangeEventArgs A_1) + 0x1d2 bytes
Devart.Data.Oracle.dll!Devart.Common.DbConnectionBase.a(Devart.Common.TransactionAction A_0) + 0x24e bytes
Devart.Data.Oracle.dll!Devart.Common.DbConnectionBase.a(object A_0, Devart.Common.TransactionStateChangeEventArgs A_1) + 0x1df bytes
Devart.Data.dll!Devart.Common.DbTransactionBase.OnStateChanging(Devart.Common.TransactionAction action, System.Data.Common.DbConnection connection) + 0x26a bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleTransaction.Commit() + 0x1be bytes
> System.Data.Entity.dll!System.Data.EntityClient.EntityTransaction.Commit() Line 92 + 0x150 bytes C#
Thank you
We are using dotConnect for Oracle v8.3.146.0 in our project.
We having problem with the OptimisticConcurrencyException that is thrown in case of concurrency - the StateEntries collection that contains the items that have the problem is empty.
I did a research in Internet but found nothing about the reason that could cause that, so I looked in the code and I saw that you are using the constructor of OptimisticConcurrencyException that takes just a string as parameter:
Code: Select all
namespace Devart.Common.Entity
{
internal abstract class dq : cl
{
protected Exception a(int A_0, int A_1)
{
return (Exception) new OptimisticConcurrencyException(string.Format("Store update, insert, or delete statement affected an unexpected number of rows ({0} of the expected {1}). Entities may have been modified or deleted since entities were loaded. Refresh ObjectStateManager entries.", (object) A_0, (object) A_1));
}
}
}
Is there any special reason to do that?
Is it possible to change it with the constructor
Code: Select all
public OptimisticConcurrencyException(string message, Exception innerException, IEnumerable<ObjectStateEntry> stateEntries)
Here is the StackTrace:
Devart.Data.Oracle.Entity.dll!Devart.Data.Oracle.Entity.o.a(System.Data.Common.DbCommand A_0, int A_1) + 0x33b bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.dq.m() + 0x1ee bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.dq.j() + 0x191 bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.cr.b() + 0x24a bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.bu.h() + 0x18d bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.bu.c() + 0x184 bytes
Devart.Data.Oracle.Entity.dll!Devart.Common.Entity.bu.a(object A_0, Devart.Common.TransactionStateChangeEventArgs A_1) + 0x1d2 bytes
Devart.Data.Oracle.dll!Devart.Common.DbConnectionBase.a(Devart.Common.TransactionAction A_0) + 0x24e bytes
Devart.Data.Oracle.dll!Devart.Common.DbConnectionBase.a(object A_0, Devart.Common.TransactionStateChangeEventArgs A_1) + 0x1df bytes
Devart.Data.dll!Devart.Common.DbTransactionBase.OnStateChanging(Devart.Common.TransactionAction action, System.Data.Common.DbConnection connection) + 0x26a bytes
Devart.Data.Oracle.dll!Devart.Data.Oracle.OracleTransaction.Commit() + 0x1be bytes
> System.Data.Entity.dll!System.Data.EntityClient.EntityTransaction.Commit() Line 92 + 0x150 bytes C#
Thank you