ORA-01453: SET TRANSACTION must be the first expression about a deal with LLBLGENPRO

I searched everything where in google, LLBLGenPro forums, Oracle documentation, I successfully followed the basic insert statement in oracle and it works. I do not know how to further debug this.

Here is my code that I use to update the LLBLGENPRO object

    using (var adapter = new DataAccessAdapter(MyConnectionString))
    {
        adapter.SaveEntity(MyCustomEntityObject);
    }

Error message:

Test method MyTest123 threw exception: 
System.Data.OracleClient.OracleException: ORA-01453: SET TRANSACTION must be first statement of transaction

Stack trace:

    at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandleInt32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandleCommandBehavior behaviorBoolean needRowidref OciRowidDescriptor rowidDescriptorref ArrayList resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowidref OciRowidDescriptor rowidDescriptor)
   at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()
   at System.Data.OracleClient.OracleTransaction..ctor(OracleConnection connectionIsolationLevel 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 isolationLevelToUseString name)
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSaveBoolean refetchAfterSaveIPredicateExpression updateRestrictionBoolean recurse)
   at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave)
   at MyTest123() in MyTest123: line 289
+3
source share
2 answers

The only thing I can think of is that you can use System.Transactions around this code, except that it should work correctly (and therefore, we cannot reproduce your error here).

Btw, it is more efficient for posting llblgen pro questions in our forums so we can pick them up right away.

+1

:

  • , . , , , , , factory
  • . DataAccess, ,
  • , ?

!

0

All Articles