Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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;

share|improve this question

migrated from stackoverflow.com Mar 24 '11 at 20:03

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

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.

share|improve this answer
add comment
up vote 0 down vote accepted

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

Maybe it installs some sql server client?

share|improve this answer
    
Are you posting this as an answer or another question? –  John Gardeniers Mar 25 '11 at 4:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.