This documentation is archived and is not being maintained.

OracleConnection.EnlistDistributedTransaction Method

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Enlists in the specified transaction as a distributed transaction.

[Visual Basic]
Public Sub EnlistDistributedTransaction( _
   ByVal distributedTransaction As ITransaction _
public void EnlistDistributedTransaction(
 ITransaction distributedTransaction
public: void EnlistDistributedTransaction(
 ITransaction* distributedTransaction
public function EnlistDistributedTransaction(
   distributedTransaction : ITransaction


A reference to an existing transaction in which to enlist.


You can enlist in an existing distributed transaction using the EnlistDistributedTransaction method if auto-enlistment is disabled. Enlisting in an existing distributed transaction ensures that, if the transaction is committed or rolled back, modifications made by the code at the data source are also committed or rolled back. For more information about distributed transactions, see Enlisting in a Distributed Transaction.

CAUTION    EnlistDistributedTransaction returns an exception if the OracleConnection has already started a transaction using BeginTransaction. However, if the transaction is a local transaction started at the data source (for example, by explicity executing the BEGIN TRANSACTION statement using an OracleCommand object), EnlistDistributedTransaction rolls back the local transaction and enlists in the existing distributed transaction as requested. You will not receive notice that the local transaction was rolled back, and are responsible for managing any local transactions not started using BeginTransaction.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

OracleConnection Class | OracleConnection Members | System.Data.OracleClient Namespace