ContextUtil.EnableCommit Method ()

 

Sets the consistent bit to true and the done bit to false in the COM+ context.

Namespace:   System.EnterpriseServices
Assembly:  System.EnterpriseServices (in System.EnterpriseServices.dll)

public static void EnableCommit()

Exception Condition
COMException

No COM+ context is available.

If asked, the COM+ context will commit the current transaction, but the object is not deactivated on method return.

The following code example calls the EnableCommit method.

[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();
    }
}

.NET Framework
Available since 1.1
Return to top
Show: