We have the following code which is failing with this error -
The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025)
using (TransactionScope scope = new TransactionScope())
{
Settings settings = new Settings();
SqlCommand cmd1 = new SqlCommand("SELECT * FROM DBO.Test1");
SqlCommand cmd2 = new SqlCommand("SELECT * FROM DBO.Test2");
cmd2.Connection = new SqlConnection(settings.App
licationCo
nnection);
using (cmd1.Connection = new SqlConnection(settings.Cli
entConnect
ion))
{
cmd1.Connection.Open();
using (cmd1.Connection = new SqlConnection(settings.Cli
entConnect
ion))
{
cmd2.Connection.Open();
cmd1.ExecuteReader();
cmd2.ExecuteReader();
}
}
scope.Complete();
}
We are using sql 2000 for one of the dbs and sql 2005 for the other db. We are using c#.