ContextUtil.DisableCommit Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Définit le consistent bit et le done bit false dans le contexte COM+.
public:
static void DisableCommit();
public static void DisableCommit();
static member DisableCommit : unit -> unit
Public Shared Sub DisableCommit ()
Exceptions
Aucun contexte COM+ n’est disponible.
Exemples
L’exemple de code suivant appelle la DisableCommit méthode.
[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
Remarques
S’il est demandé, le contexte COM+ vote pour abandonner la transaction actuelle, mais l’objet n’est pas désactivé lors du retour de méthode.