Export (0) Print
Expand All

DbConnection.EnlistTransaction Method

Enlists in the specified transaction.

Namespace: System.Data.Common
Assembly: System.Data (in system.data.dll)

'Declaration
Public Overridable Sub EnlistTransaction ( _
	transaction As Transaction _
)
'Usage
Dim instance As DbConnection
Dim transaction As Transaction

instance.EnlistTransaction(transaction)
public void EnlistTransaction (
	Transaction transaction
)
public function EnlistTransaction (
	transaction : Transaction
)
Not applicable.

Parameters

transaction

A reference to an existing Transaction in which to enlist.

New in ADO.NET 2.0 is support for using the EnlistTransaction method to enlist in a distributed transaction. Because it enlists a connection in a Transaction instance, EnlistTransaction takes advantage of functionality available in the System.Transactions namespace for managing distributed transactions. Once a connection is explicitly enlisted in a transaction, it cannot be unenlisted or enlisted in another transaction until the first transaction finishes.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft