Share via


ContextUtil.EnableCommit メソッド

定義

COM+ コンテキストの consistent ビットを true に、done ビットを false に設定します。

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

例外

COM+ コンテキストが使用できません。

次のコード例では、 メソッドを 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

注釈

要求された場合、COM+ コンテキストは現在のトランザクションをコミットしますが、メソッドの戻り時にオブジェクトは非アクティブ化されません。

適用対象