ContextUtil.EnableCommit Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mengatur bit ke consistent
true
dan done
bit ke false
dalam konteks COM+.
public:
static void EnableCommit();
public static void EnableCommit ();
static member EnableCommit : unit -> unit
Public Shared Sub EnableCommit ()
Pengecualian
Tidak ada konteks COM+ yang tersedia.
Contoh
Contoh kode berikut memanggil EnableCommit metode .
[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
Keterangan
Jika diminta, konteks COM+ akan melakukan transaksi saat ini, tetapi objek tidak dinonaktifkan pada pengembalian metode.
Berlaku untuk
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.