I'm running a winform application from visual studio 2010 .net 4.0 that needs to connect to sql server 2000. The problem is I constantly get:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I already have shut down the firewall from the server and allowed remote connections, have pinged the server.

The strange thing is I CAN connect with one remote computer running the application but with another I can't. They are both running windows 7. The computer that connects correctly has the sql server 2008 management studio installed (from which I can also connnect to the SQL server 2000 instance) the other one doesn't have it, it only has visual studio 2010.

Here is the connection string I'm using:

Data Source=server\SQLSERVER2000;Initial Catalog=XXX_Test;User Id=XXX;Password=XXX;


2 Answers 2


Do you have other SQL instances on the same server such that you need the \SQLSERVER2000 portion of the connection string? If not, try leaving this off.

Also, try using the server's IP rather than name in the Data Source parameter in case the prolem is DNS-related, especially since it works on some machines but not others.


Strangely, I installed the sql server 2008 management studio and it started working.

Maybe it installs some sql server client?

  • Are you posting this as an answer or another question? Mar 25, 2011 at 4:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .