服务器上的MSDTC无效 [英] Invalid MSDTC on server

查看:76
本文介绍了服务器上的MSDTC无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有以下代码


I have te following code

private void Cmd_PrintFichRensRPT_Click(object sender, EventArgs e)
        {
            bool MAJ = false;

            if (DTGVFicheRensRPT.RowCount != 0)
            {
                using (TransactionScope transaction = new TransactionScope())
                {
                    try
                    {
                        for (int l = 0; l <= DTGVFicheRensRPT.RowCount - 1; l++)
                        {
                            string DosID = DTGVFicheRensRPT.Rows[l].Cells[8].Value.ToString();
                            //MAJ
                            MAJ = ExecuteRequete.ExecuteStoredProcedure("MAJStatutDossier", new SqlParameter("@StaId", 11), new SqlParameter("@DosID", DosID),
                                   new SqlParameter("@staBL", null), new SqlParameter("@staCRprod", null));
                        }
                    }
                    catch (Exception Message)
                    {
                        MessageBox.Show(Message.ToString()); 
                    }
                    // Valider la transaction
                    transaction.Complete();
                }
                if (MAJ )
                {
                    CRV_FichRensRPT.PrintReport();
                    UtilsProcFunc.Edition(this, 1);  
                }
                else
                { UtilsProcFunc.Edition(this, 1); }
            }
            else
            {
 
            }
        }





执行时我在第一次执行''for statement'后出现以下错误''服务器上的无效MSDTC MarcelleNGOUNOU\SQLEXPRESS不可用于参数MachineName

及其转移到transaction.complete但没有回滚!



感谢您的帮助



at the execution i have the following error after the first execution of the ''for statement'' "Invalid MSDTC on server MarcelleNGOUNOU\SQLEXPRESS is unavailable for prameter MachineName"
and its move to transaction.complete but did not rollback!

thanks for your help

推荐答案

这是MSDTC配置问题。您可能正确安装/运行/配置sqlserver pc和运行pc的应用程序。请访问链接
It is MSDTC configuration issue. You might be installed/run/configured properly both sqlserver pc and application running pc. Please visit the link


这篇关于服务器上的MSDTC无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆