ContextUtil.DisableCommit Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Legt sowohl das consistent
-Bit als auch das done
-Bit im COM+-Kontext auf false
fest.
public:
static void DisableCommit();
public static void DisableCommit ();
static member DisableCommit : unit -> unit
Public Shared Sub DisableCommit ()
Ausnahmen
Es ist kein COM+-Kontext verfügbar.
Beispiele
Im folgenden Codebeispiel wird die DisableCommit -Methode aufgerufen.
[Transaction(TransactionOption::Required)]
public ref class ContextUtil_DisableCommit: public ServicedComponent
{
public:
void Example()
{
// Set both the consistent bit and the done bit to false for the
// current COM+ context.
ContextUtil::DisableCommit();
}
};
[Transaction(TransactionOption.Required)]
public class ContextUtil_DisableCommit : ServicedComponent
{
public void Example()
{
// Set both the consistent bit and the done bit to false for the
// current COM+ context.
ContextUtil.DisableCommit();
}
}
<Transaction(TransactionOption.Required)> _
Public Class ContextUtil_DisableCommit
Inherits ServicedComponent
Public Sub Example()
' Set both the consistent bit and the done bit to false for the
' current COM+ context.
ContextUtil.DisableCommit()
End Sub
End Class
Hinweise
Wenn Sie dazu aufgefordert werden, stimmt der COM+-Kontext für den Abbruch der aktuellen Transaktion, aber das Objekt wird bei der Rückgabe der Methode nicht deaktiviert.
Gilt für:
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für