SQL 2000与C#Windows应用程序的连接问题 [英] Sql 2000 Connection problem with C# windows application

查看:93
本文介绍了SQL 2000与C#Windows应用程序的连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我开发的C#Windows应用程序必须连接SQL2000,但是当我尝试运行该程序时,它将显示错误错误[IM002] [Microsoft ODBC驱动程序管理器]数据源名称未找到且未指定默认派生程序".我应该怎么办,如果可能的话,请给我建议

谢谢与问候
Indrajit Dasgupta

Hi All,
I develop C# windows application whaere I have to connect with SQL2000 but when I try to run the program then it shows error "ERROR [IM002] [Microsoft ODBC Driver Manager] Data source name not found and no default Deriver specified". What should I do, if it is possible please advice me

Thanks & Regards
Indrajit Dasgupta

推荐答案

使用SqlConnectionSqlCommand本机连接器而不是ODBC驱动程序.
请参阅: http://msdn.microsoft.com/en-us/library/8t72t3k4.aspx [^ ]
Use the SqlConnection, SqlCommand native connectors instead of the ODBC drivers.

See : http://msdn.microsoft.com/en-us/library/8t72t3k4.aspx[^]


您的DSN看起来还不错

如果您的操作系统是服务器版本,仍然会发生这种情况.

在服务器操作系统中,有两个dsn/odbc管理器

1. 64位dsn/odbc管理器-默认菜单管理器打开的一个
2. 32位dsn/odbc管理器

如果您使用的是服务器操作系统,则应使用默认的dsn/odbc管理器(64位)来创建DSN,并且您的应用程序可能期望32位DSN/ODBC设置在
上运行.
如果您在服务器上,也可以在32位以下创建相同的DSN,它应该可以解决问题.

您可以通过以下命令启动32位dsn/odbc

your DSN looking okay

Still,this can happen, if your operating system is server version.

In a server operating system there are two dsn/odbc managers

1. 64 bit dsn/odbc managers - Default one opened by the menu navigations
2. 32 bit dsn/odbc managers

If you are on the server operating system, you would have used the deafult dsn/odbc manager (64 bit) to create the DSN and where as you application might be expecting a 32 bit DSN/ ODBC settings

If you are on the server versin, create the same DSN under 32 bit as well and it should resolve the problem.

You can launch the 32 bit dsn/odbc by the followings

C:\Windows\SysWOW64\odbcad32.exe



让我知道怎么回事吗?



Let me know how it goes ?


这篇关于SQL 2000与C#Windows应用程序的连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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