ContextUtil.DisableCommit Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee stelt u zowel de consistent bit als de done bit false in de COM+-context in.
public:
static void DisableCommit();
public static void DisableCommit();
static member DisableCommit : unit -> unit
Public Shared Sub DisableCommit ()
Uitzonderingen
Er is geen COM+-context beschikbaar.
Voorbeelden
In het volgende codevoorbeeld wordt de methode aangeroepen DisableCommit .
[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
Opmerkingen
Indien gevraagd, stemmen de COM+ context stemmen om de huidige transactie af te breken, maar het object wordt niet gedeactiveerd bij methode return.