ORA-01453: SET TRANSACTION 必须是事务处理的第一个语句

解决方案 »

  1.   

    先试试这个解决方法,如果还不行的话,就贴sql语句出来ORA-01453: SET TRANSACTION must be first statement of transaction Cause: A transaction was not processed properly because the SET TRANSACTION statement was not the first statement. Action: Commit or roll back the current transaction before using the statement SET TRANSACTION. 
      

  2.   

    Dim cn As New OracleConnection(db("XXGZ"))
                Dim cm As New OracleCommand
                Dim tr As OracleTransaction            cn.Open()
                Try
                    tr = cn.BeginTransaction(IsolationLevel.ReadCommitted)-----错误行
      

  3.   

    问singlepine(小山)兄:
    应该怎么处理?看不懂
      

  4.   

    Action: Commit or roll back the current transaction before using the statement SET TRANSACTION. 
      

  5.   

    ORA-01453: SET TRANSACTION 必须是事务处理的第一个语句
    似乎说的很详细了
      

  6.   

    先执行 SET TRANSACTION,然后执行你的sql语句,最后commit一下,出错回滚
      

  7.   

    SET TRANSACTION怎么执行,不懂.
      

  8.   

    tr = cn.BeginTransaction()
    去掉参数就可以执行,很奇怪,而在别的类中没有这个问题.当A类出现错误时,去执行其它类Bs时,语句一样但不出错.