gpt4 book ai didi

c# - ORA-01453 : SET TRANSACTION must be first statement of transaction with LLBLGENPRO

转载 作者:行者123 更新时间:2023-11-30 17:49:24 25 4
gpt4 key购买 nike

我在谷歌、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

最佳答案

我唯一能想到的是,您可以围绕这段代码使用 System.Transactions,除此之外,它应该可以正常工作(确实如此,我们无法在此处重现您的错误)。

顺便说一句,在我们的论坛上发布 llblgen pro 问题会更有效率,这样我们就可以立即获取它们。

关于c# - ORA-01453 : SET TRANSACTION must be first statement of transaction with LLBLGENPRO,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21715054/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com