服务器上的MSDTC无效

编程入门 行业动态 更新时间:2024-10-28 14:30:16
本文介绍了服务器上的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 及其转移到transactionplete但没有回滚! 感谢您的帮助

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 transactionplete 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无效

本文发布于:2023-10-31 18:21:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546898.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:器上   MSDTC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!