如何将ODBC连接到Sql Server 2005 [英] How to connect ODBC to Sql Server 2005

查看:78
本文介绍了如何将ODBC连接到Sql Server 2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我无法将ODBC连接到Sql Server2005.得到sql服务器错误:连接失败
SQL状态:``01000''
Sql Server错误:"11001"

Hi,
I am unable to connect ODBC to the Sql Server 2005. getting the sql server errors : Connection Failed
Sql state : ''01000''
Sql Server Error : ''11001''

推荐答案

您已声明自己正在获取错误,但并没有注意将错误声明为更精确.

此处 [
You have stated that you''re getting Error but you haven''t taken care to state your error to be more precise.

HERE[^] is a Troubleshooter that can help you around.


请具体说明您收到的错误消息,因为不同的错误消息的原因可能有所不同.

仅供参考

标准安全性
Please be specific with error message you are getting, because the reason may be different for different error message.

FYI

Standard Security
Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;


使用serverName \ instanceName作为数据源连接到特定的SQL Server实例.
您正在使用SQL Server 2005 Express吗?不要错过服务器名称语法Servername \ SQLEXPRESS,用Servername替换为SQL Server 2005 Express安装所在计算机的名称.

标准安全性替代语法

此连接字符串产生的结果与上一个相同.包含它的原因是要指出某些连接字符串关键字具有许多等效项.


Use serverName\instanceName as Data Source to connect to a specific SQL Server instance.
Are you using SQL Server 2005 Express? Don''t miss the server name syntax Servername\SQLEXPRESS where you substitute Servername with the name of the computer where the SQL Server 2005 Express installation resides.

Standard Security alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;User ID=myUsername;Password=myPassword;Trusted_Connection=False;



受信任的连接



Trusted Connection

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;



受信任的连接替代语法

此连接字符串产生的结果与上一个相同.包含它的原因是要指出某些连接字符串关键字具有许多等效项.



Trusted Connection alternative syntax

This connection string produce the same result as the previous one. The reason to include it is to point out that some connection string keywords have many equivalents.

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;



连接到SQL Server实例

在服务器密钥的值中指定服务器实例的语法对于SQL Server的所有连接字符串都是相同的.



Connecting to an SQL Server instance

The syntax of specifying the server instance in the value of the server key is the same for all connection strings for SQL Server.

Server=myServerName\theInstanceName;Database=myDataBase;Trusted_Connection=True;


这篇关于如何将ODBC连接到Sql Server 2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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