让我们考虑以下通过 odbc 驱动程序连接 sql server 的连接字符串为
"Driver={SQL Server Native Client 10.0};Server=xxx.xx.xx.xx,xxxx;Database=mydata;Uid=xx;Pwd=xxxxxx;"
运行此命令时出现错误
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
我也在那台机器上启用了远程连接。
在当前机器上:visual studio 已过期,未安装 sql server 2008 r2。
我现在必须做什么才能解决问题
等待您的回复。。
更新:
当我在系统的管理数据源 [odbc] 中注册驱动程序时,我得到的响应为
Connection failed
sqlsatte:'08001'
Sql Server Error:27
Registry information is corrupt or missing.