ContextUtil.DisableCommit ContextUtil.DisableCommit ContextUtil.DisableCommit ContextUtil.DisableCommit Method

Определение

Устанавливает для битов consistent и done значение false в контексте COM+.Sets both the consistent bit and the done bit to false in the COM+ context.

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

Исключения

Контекст COM+ недоступен.No COM+ context is available.

Примеры

В следующем примере кода вызывается DisableCommit метод.The following code example calls the DisableCommit method.

[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 'Example
End Class 'ContextUtil_DisableCommit

Комментарии

При запросе контекст COM+ наследует голосовое сообщение, чтобы прервать текущую транзакцию, но объект не будет деактивирован при возврате метода.If asked, the COM+ context votes to abort the current transaction, but the object is not deactivated on method return.

Применяется к