ContextUtil.EnableCommit Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Anger biten consistent till true och biten done till false i COM+-kontexten.
public:
static void EnableCommit();
public static void EnableCommit();
static member EnableCommit : unit -> unit
Public Shared Sub EnableCommit ()
Undantag
Ingen COM+-kontext är tillgänglig.
Exempel
I följande kodexempel anropas EnableCommit metoden.
[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
Kommentarer
Om du tillfrågas checkar COM+-kontexten in den aktuella transaktionen, men objektet inaktiveras inte vid metodretur.