这样好吗?似乎容易造成死锁
你换个方式实现吧

解决方案 »

  1.   

    还可以怎样?我对死锁没有研究
      

  2.   

    begin tran T3fun1()
    fun2()if hasError then
       rollback tran T3
    else
       commit tran T3
    end iffun1()
    {
        begin tran T1'我想把以下操作加入到T1中
        insert....
        update....
        if error then
           hasError = true
        end if
    }fun2()
    {
        begin tran T2'我想把以下操作加入到T2中
        insert....
        update....
        if error then
           hasError = true
        end if
    }你看这样是不是好点?