ContextUtil.EnableCommit Méthode

Définition

Assigne au bit consistent la valeur true et au bit done la valeur false dans le contexte COM+.

public:
 static void EnableCommit();
public static void EnableCommit ();
static member EnableCommit : unit -> unit
Public Shared Sub EnableCommit ()

Exceptions

Aucun contexte COM+ n'est disponible.

Exemples

L’exemple de code suivant appelle la EnableCommit méthode .

[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

Remarques

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

S’applique à