C#.Net Windows应用程序无法在Windows Server 2003中打开MS Access数据库连接 [英] C# .Net windows application unable to open MS Access Database Connection in windows server 2003

查看:139
本文介绍了C#.Net Windows应用程序无法在Windows Server 2003中打开MS Access数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我已经使用c#在.net中创建了Windows应用程序,我的应用程序在 Windows XP和Windows 7 中运行完美但是当我尝试在 Windows Server 2003中执行该应用程序时然后在打开ms访问数据库的连接时出现错误,如下所示:



'System.Transactions.Diagnostics.DiagnosticTrace'的类型初始化程序一个例外。



在System.Transactions.Transaction.get_Current()

在System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()

at System.Data.Common.ADP.NeedManualEnlistment()

at System.Data.OleDb.OleDbConnection.Open()

at Com.Xpdite.CC .Utils.DbConnection.getConnection()




所以任何人都能为我提供这个问题的解决方案。



请帮我摆脱这个问题......

Hi i have created windows application in .net with c# and my application running perfectly in Windows XP and Windows 7 but when i try to execute that application in Windows Server 2003 then it getting error at opening connection of ms access database which is specify below:

The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception.

at System.Transactions.Transaction.get_Current()
at System.Data.Common.ADP.IsSysTxEqualSysEsTransaction()
at System.Data.Common.ADP.NeedManualEnlistment()
at System.Data.OleDb.OleDbConnection.Open()
at Com.Xpdite.CC.Utils.DbConnection.getConnection()


so can any one provide me the solutions for this problem.

Please help me to get out from this problem...

推荐答案





我遇到了类似的问题。我从app.config中移除了配置部分并且它有效。

不确定这是否可以解决。
Hi,

I had a similar problem.I removed the configsection from the app.config and it worked.
Not sure whether this can work out here.


嗨Ankit,



我通过将配置部分放在app.config文件中配置标记旁边的顶部解决了这个问题。



谢谢

Sankarsai Mohandas
Hi Ankit,

I resolved this issue by placing the config sections on top next to configuration tag in app.config file.

thanks
Sankarsai Mohandas


这篇关于C#.Net Windows应用程序无法在Windows Server 2003中打开MS Access数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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