while(true)
  BegnTrans
  ...
  if (CommitTrans 失败) {
    RollbackTrans
    continue;
  }
  Go on...

解决方案 »

  1.   

    纠正while (true) {
      BegnTrans
      ...
      if (CommitTrans 失败) {
        RollbackTrans
        continue;
      } else
        break;
    }
      Go on...
      

  2.   

    LZ想法很好这个在Sql2005中可以通过 try catch 实现
      

  3.   

    事务有这种用法吗?担心死循环,虽然理论上能够commit
      

  4.   

    OPEN 
    BegnTranswhile (true) {
     
      ...
      if (CommitTrans 失败) {
        RollbackTrans
        continue;
      } else
        break;
    }
      Go on...把OPEN 
    BegnTrans放到WHILE外面