Click here to Skip to main content
15,880,796 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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'
Posted
Updated 9-Jan-11 19:30pm
v2
Comments
Estys 8-Jan-11 3:21am    
What error, how are you trying to connect? Show us please.

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.
 
Share this answer
 
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;

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;


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;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900