Enlists in the specified transaction.
These samples demonstrate usage of
Devart.Data.Magento.MagentoConnection.EnlistTransaction.
MagentoCommand1.Connection=MagentoConnection1;
using (TransactionScope transScope = new TransactionScope()) {
MagentoConnection1.Open();
MagentoCommand1.ExecuteNonQuery();
transScope.Complete();
}
MagentoConnection1.Close();
- or -
MagentoCommand1.Connection=MagentoConnection1;
MagentoConnection1.Open();
using (TransactionScope transScope = new TransactionScope()) {
MagentoConnection1.EnlistTransaction(Transaction.Current);
MagentoCommand1.ExecuteNonQuery();
transScope.Complete();
}
MagentoConnection1.Close();
- or -
CommittableTransaction cmtTx = new CommittableTransaction();
MagentoConnection1.Open();
MagentoConnection1.EnlistTransaction(cmtTx);
MagentoCommand1.ExecuteNonQuery();
MagentoConnection1.Close();
Me.MagentoCommand1.Connection = Me.MagentoConnection1
Using transScope = New Transactions.TransactionScope
Me.MagentoConnection1.Open()
Me.MagentoCommand1.ExecuteNonQuery()
transScope.Complete()
End Using
Me.MagentoConnection1.Close()
- or -
Me.MagentoCommand1.Connection = Me.MagentoConnection1
Me.MagentoConnection1.Open()
Using transScope = New Transactions.TransactionScope
Me.MagentoConnection1.EnlistTransaction(Transactions.Transaction.Current)
Me.MagentoCommand1.ExecuteNonQuery()
transScope.Complete()
End Using
Me.MagentoConnection1.Close()
- or -
Dim cmtTx As New Transactions.CommittableTransaction
Me.MagentoConnection1.Open()
Me.MagentoConnection1.EnlistTransaction(cmtTx)
Me.MagentoCommand1.ExecuteNonQuery()
Me.MagentoConnection1.Close()
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2