Bagikan melalui


ContextUtil.DisableCommit Metode

Definisi

consistent Mengatur bit dan done bit ke false dalam konteks COM+.

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

Pengecualian

Tidak ada konteks COM+ yang tersedia.

Contoh

Contoh kode berikut memanggil DisableCommit metode .

[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

Keterangan

Jika diminta, konteks COM+ memilih untuk membatalkan transaksi saat ini, tetapi objek tidak dinonaktifkan pada pengembalian metode.

Berlaku untuk