Share via


ContextUtil.DisableCommit Méthode

Définition

Assigne au bit consistent et au bit done la valeur 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

Si vous y êtes invité, le contexte COM+ vote pour annuler la transaction actuelle, mais l’objet n’est pas désactivé lors du retour de méthode.

S’applique à