通过ODBC驱动程序连接从DOTNET的SQL Server

问题描述:

让我们考虑一个运行此命令我得到错误的通过ODBC驱动程序连接从DOTNET的SQL Server

ERROR [08001] [Microsoft][SQL Server Native Client 10.0]Registry information is corrupt or missing. Make sure the provider installed and registered correctly. 

ERROR [08001] [Microsoft][SQL Server Native Client 10.0]Client unable to establish connection 

ERROR [08001] [Microsoft][SQL Server Native Client 10.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. 
2013-02-12 12:17:00,247 

ERROR  
Error at Executenonquery:ExecuteNonQuery: CommandText property has not been initialized 

,同时通过ODBC驱动程序

"Driver={SQL Server Native Client 10.0};Server=xxx.xx.xx.xx,xxxx;Database=mydata;Uid=xx;Pwd=xxxxxx;" 

连接的SQL Server下面的连接字符串我在该机器中也启用了远程连接。

在当前机器:视觉工作室已过期和SQL Server 2008 R2未安装。

我有什么,以解决这一问题

等待您的答复,现在做..

更新:

,而我在登记管理数据源[ODBC]在系统驱动程序我得到的答复如下:

Connection failed 

sqlsatte:'08001' 

Sql Server Error:27 

Registry information is corrupt or missing. 
+0

操作系统事件日志告诉你什么? – 2013-02-12 06:57:29

+0

@ ling.s我在哪里可以找到它? – GowthamanSS 2013-02-12 07:00:07

在我看来,您的SQL Native Client安装可能存在问题。查看安装/取消阻止SQL Server Native Client上的MSDN documentation以及应该能够找到安装文件的位置。卸载并重新安装它可能是值得的。

一旦你确定它安装好,使用ODBC管理工具(假设你使用XP)设置和测试ODBC连接。

ODBC Admin window showing SQL Native Client 10 installation