Enlists in the specified transaction.
These samples demonstrate usage of
Devart.Data.MailChimp.MailChimpConnection.EnlistTransaction.
MailChimpCommand1.Connection=MailChimpConnection1;
using (TransactionScope transScope = new TransactionScope()) {
MailChimpConnection1.Open();
MailChimpCommand1.ExecuteNonQuery();
transScope.Complete();
}
MailChimpConnection1.Close();
- or -
MailChimpCommand1.Connection=MailChimpConnection1;
MailChimpConnection1.Open();
using (TransactionScope transScope = new TransactionScope()) {
MailChimpConnection1.EnlistTransaction(Transaction.Current);
MailChimpCommand1.ExecuteNonQuery();
transScope.Complete();
}
MailChimpConnection1.Close();
- or -
CommittableTransaction cmtTx = new CommittableTransaction();
MailChimpConnection1.Open();
MailChimpConnection1.EnlistTransaction(cmtTx);
MailChimpCommand1.ExecuteNonQuery();
MailChimpConnection1.Close();
Me.MailChimpCommand1.Connection = Me.MailChimpConnection1
Using transScope = New Transactions.TransactionScope
Me.MailChimpConnection1.Open()
Me.MailChimpCommand1.ExecuteNonQuery()
transScope.Complete()
End Using
Me.MailChimpConnection1.Close()
- or -
Me.MailChimpCommand1.Connection = Me.MailChimpConnection1
Me.MailChimpConnection1.Open()
Using transScope = New Transactions.TransactionScope
Me.MailChimpConnection1.EnlistTransaction(Transactions.Transaction.Current)
Me.MailChimpCommand1.ExecuteNonQuery()
transScope.Complete()
End Using
Me.MailChimpConnection1.Close()
- or -
Dim cmtTx As New Transactions.CommittableTransaction
Me.MailChimpConnection1.Open()
Me.MailChimpConnection1.EnlistTransaction(cmtTx)
Me.MailChimpCommand1.ExecuteNonQuery()
Me.MailChimpConnection1.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