Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DbConnection::EnlistTransaction Method (Transaction^)

 

Enlists in the specified transaction.

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

public:
virtual void EnlistTransaction(
	Transaction^ transaction
)

Parameters

transaction
Type: System.Transactions::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.

.NET Framework
Available since 2.0
Return to top
Show:
© 2017 Microsoft