Share via


SqlCeConnection.EnlistTransaction Method (Transaction)

Enlists in the specified Transaction.

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

Syntax

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

instance.EnlistTransaction(SysTrans)
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public virtual void EnlistTransaction(
    Transaction SysTrans
)
[SecurityCriticalAttribute]
[SecurityTreatAsSafeAttribute]
public:
virtual void EnlistTransaction(
    Transaction^ SysTrans
)
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
abstract EnlistTransaction : 
        SysTrans:Transaction -> unit 
[<SecurityCriticalAttribute>]
[<SecurityTreatAsSafeAttribute>]
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 nulla null reference (Nothing in Visual Basic).

See Also

Reference

SqlCeConnection Class

EnlistTransaction Overload

System.Data.SqlServerCe Namespace