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, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.