我搜索了google,LLBLGenPro论坛,Oracle文档中的每个位置,我已经在oracle中成功执行了底层插入语句,并且它可以工作。我不知道如何进一步调试这个。
这是我用来更新LLBLGENPRO实体的代码
using (var adapter = new DataAccessAdapter(MyConnectionString))
{
adapter.SaveEntity(MyCustomEntityObject);
}
错误讯息:
Test method MyTest123 threw exception:
System.Data.OracleClient.OracleException: ORA-01453: SET TRANSACTION must be first statement of transaction
堆栈追踪:
at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, ref OciRowidDescriptor rowidDescriptor, ref ArrayList resultParameterOrdinals)
at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, ref OciRowidDescriptor rowidDescriptor)
at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
at System.Data.OracleClient.OracleTransaction..ctor(OracleConnection connection, IsolationLevel isolationLevel)
at System.Data.OracleClient.OracleInternalConnection.BeginOracleTransaction(IsolationLevel il)
at System.Data.OracleClient.OracleInternalConnection.BeginTransaction(IsolationLevel il)
at System.Data.OracleClient.OracleConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.BeginTransaction(IsolationLevel isolationLevel)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateNewPhysicalTransaction()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.StartTransaction(IsolationLevel isolationLevelToUse, String name)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave, IPredicateExpression updateRestriction, Boolean recurse)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave)
at MyTest123() in MyTest123: line 289
答案 0 :(得分:1)
我唯一能想到的是你可能会围绕这段代码使用System.Transactions,除此之外,它应该正常工作(确实如此,我们不能在这里重现你的错误)。
顺便说一下,在我们的论坛上发布llblgen pro问题会更有效率,所以我们可以马上把它们拿起来。
答案 1 :(得分:0)
一些想法: