Informix .NET Provider and TransactionScope not rolling back

Informix .NET Provider and TransactionScope not rolling back

I have a little proof-of-concept distributed transaction application that is doing a simple insert into two tables -- one a MS SQL Server table, the other an Informix Dynamic Server table. The problem comes when an exception is thrown. If I use the OLE DB driver for Informix, everything works fine -- both inserts roll back; if I use the .NET Data Provider for Informix, the Informix insert does not roll back.

Does anyone have any ideas as to what is going on?

In the code snippet, you will notice the commented-out EnlistTransaction() method. When explicitly called, I get an exception indicating that the method is not implemented.

Code snippet:

private void doTransaction(Boolean commitIndicator) {     using (TransactionScope tscope = new TransactionScope())     {         using (SqlConnection cn = new SqlConnection { ConnectionString = sql2008Settings.ConnectionString })         {             cn.Open();              using (SqlCommand cmd = cn.CreateCommand())             {                 cmd.CommandText = "insert into uom (uom) values ('Test')";                 int count = cmd.ExecuteNonQuery();             }         }         using (IfxConnection cn = new IfxConnection())         {             cn.ConnectionString = idnSettings.ConnectionString;             cn.Open();             //cn.EnlistTransaction(Transaction.Current);             using (IfxCommand cmd = cn.CreateCommand())             {                 cmd.CommandText = "insert into table_ (code_, description) values ('JEP', 'Test')";                 int count = cmd.ExecuteNonQuery();             }         }         if (commitIndicator)         {         }         else         {             throw new Exception("planned failure");         }         tscope.Complete();     } } 

Connection Strings:

Installing SciPy on Linux Debian


How To Set PATH (Enviornment Variable) using InstallScript InstallShield
I'm pretty sure that the Informix .Net ADO Provider doesn't support TransactionScope.

Can I “transplant” a ClickOnce application from one PC to another?
It's not a requirement of an ADO.Net provider..
Shoes and Gems
You might get this to work by using COM+ and MSDTC, since the Informix does support that.

Can I script a Cygwin install to include certain packages?
You'll need to do the following:.
How to install extended latin A and B on umbraco
  • Add "enlist=true" to your connection string
  • Add EnterpriseServicesInteropOption.Full to your TransactionScope constructor

Is there a difference between setting JAVA_HOME through cmd line or GUI

89 out of 100 based on 49 user ratings 1049 reviews