[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

TransactionScope question

Asked by Democracydata in Software/Systems Design, Intellectual Property

Tags: TransactionScope

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.ApplicationConnection);
                    using (cmd1.Connection = new SqlConnection(settings.ClientConnection))
                    {
                        cmd1.Connection.Open();
                        using (cmd1.Connection = new SqlConnection(settings.ClientConnection))
                        {
                            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#.
[+][-]09/15/09 09:39 AM, ID: 25336752Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/20/09 10:21 AM, ID: 25872948Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11/21/09 01:57 AM, ID: 25877184Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625