ContextUtil.EnableCommit Método

Definición

Asigna al bit consistent el valor true, y al bit done el valor false, en el contexto de COM+.

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

Excepciones

No hay contexto de COM+ disponible.

Ejemplos

En el ejemplo de código siguiente se llama al EnableCommit método .

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

Comentarios

Si se le pregunta, el contexto com+ confirmará la transacción actual, pero el objeto no se desactiva en la devolución del método.

Se aplica a