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