SqlCeConnection.EnlistTransaction 方法 (Transaction)
編列於指定的 Transaction 中。
命名空間: System.Data.SqlServerCe
組件: System.Data.SqlServerCe (在 System.Data.SqlServerCe.dll 中)
語法
'宣告
<SecurityCriticalAttribute> _
<SecurityTreatAsSafeAttribute> _
Public Overridable Sub EnlistTransaction ( _
SysTrans As Transaction _
)
'用途
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
)
參數
- SysTrans
型別:System.Transactions.Transaction
您想要編列的交易
例外狀況
例外狀況 | 條件 |
---|---|
InvalidOperationException | 連接已經編列於本機交易中。 -或- 連接無法編列於交易中。 |
NullReferenceException | SysTrans 是 nullnull 參考 (在 Visual Basic 中為 Nothing)。 |