ContextUtil.DisableCommit Método

Definição

Define tanto o consistent bit como done o bit para false no contexto COM+.

public:
 static void DisableCommit();
public static void DisableCommit();
static member DisableCommit : unit -> unit
Public Shared Sub DisableCommit ()

Exceções

Não existe contexto disponível no COM+.

Exemplos

O seguinte exemplo de código chama o DisableCommit método.

[Transaction(TransactionOption::Required)]
public ref class ContextUtil_DisableCommit: public ServicedComponent
{
public:
   void Example()
   {
      // Set both the consistent bit and the done bit to false for the
      // current COM+ context.
      ContextUtil::DisableCommit();
   }
};
[Transaction(TransactionOption.Required)]
public class ContextUtil_DisableCommit : ServicedComponent
{
    public void Example()
    {
        // Set both the consistent bit and the done bit to false for the
        // current COM+ context.
        ContextUtil.DisableCommit();
    }
}
<Transaction(TransactionOption.Required)>  _
Public Class ContextUtil_DisableCommit
    Inherits ServicedComponent
    
    Public Sub Example() 
        ' Set both the consistent bit and the done bit to false for the
        ' current COM+ context.
        ContextUtil.DisableCommit()
    
    End Sub
End Class

Observações

Se solicitado, o contexto COM+ vota para abortar a transação atual, mas o objeto não é desativado no retorno do método.

Aplica-se a