Share via


EnlistTransaction Method (Transaction)

Enlists in the specified Transaction.

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

Syntax

'Declaration
Public Overridable Sub EnlistTransaction ( _
    SysTrans As Transaction _
)
'Usage
Dim instance As SqlCeConnection
Dim SysTrans As Transaction

instance.EnlistTransaction(SysTrans)
public virtual void EnlistTransaction(
    Transaction SysTrans
)
public:
virtual void EnlistTransaction(
    Transaction^ SysTrans
)
abstract EnlistTransaction : 
        SysTrans:Transaction -> unit 
override EnlistTransaction : 
        SysTrans:Transaction -> unit 
public function EnlistTransaction(
    SysTrans : Transaction
)

Parameters

Exceptions

Exception Condition
InvalidOperationException

The connection is already enlisted in a local transaction.

-or-

The connection could not be enlisted in the transaction.

NullReferenceException

SysTrans is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

See Also

Reference

SqlCeConnection Class

SqlCeConnection Members

EnlistTransaction Overload

System.Data.SqlServerCe Namespace