ContextUtil.EnableCommit Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the consistent
bit to true
and the done
bit to false
in the COM+ context.
public:
static void EnableCommit();
public static void EnableCommit ();
static member EnableCommit : unit -> unit
Public Shared Sub EnableCommit ()
Exceptions
No COM+ context is available.
Examples
The following code example calls the EnableCommit method.
[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
Remarks
If asked, the COM+ context will commit the current transaction, but the object is not deactivated on method return.
Applies to
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.