Sdílet prostřednictvím


ContextUtil.EnableCommit Metoda

Definice

consistent Nastaví bit na true a bit donefalse na v kontextu modelu COM+.

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

Výjimky

Není k dispozici žádný kontext modelu COM+.

Příklady

Následující příklad kódu volá metodu EnableCommit .

[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

Poznámky

Pokud se zobrazí dotaz, kontext modelu COM + potvrdí aktuální transakci, ale objekt není deaktivován při vrácení metody.

Platí pro