Transaction.Rollback 方法

定义

回滚(中止)事务。Rolls back (aborts) the transaction.

重载

Rollback()

回滚(中止)事务。Rolls back (aborts) the transaction.

Rollback(Exception)

回滚(中止)事务。Rolls back (aborts) the transaction.

Rollback()

回滚(中止)事务。Rolls back (aborts) the transaction.

public:
 void Rollback();
public void Rollback ();
member this.Rollback : unit -> unit
Public Sub Rollback ()

注解

事务对象的任何副本都可以通过调用此方法来启动事务的回滚。Any copy of a transaction object can initiate the rollback of the transaction by calling this method. 只有原始 transaction 对象(CommittableTransaction 对象)可以用于启动提交事务的尝试。Only the original transaction object, which is a CommittableTransaction object, can be used to initiate an attempt to commit the transaction. 如果已确定事务的结果后调用此方法,则会引发异常。An exception is thrown when this method is called after the outcome of the transaction has already been determined.

Rollback(Exception)

回滚(中止)事务。Rolls back (aborts) the transaction.

public:
 void Rollback(Exception ^ ex);
public void Rollback (Exception ex);
member this.Rollback : Exception -> unit
Public Sub Rollback (ex As Exception)

参数

e
Exception

有关发生回滚的原因的说明。An explanation of why a rollback occurred.

适用于