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
Співпраця з нами на GitHub
Джерело цього вмісту можна знайти на GitHub, де також можна створювати й переглядати запитання та запити на внесення змін. Докладні відомості наведено в нашому посібнику для співавторів.