Click here to Skip to main content
15,894,017 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a windows form that connects to SQL just fine on about 5/10 PC's but on the other pc's i get the following error:
System.Data.SqlClient.SqlException (0x80131904): 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've been searching for ways to resolve this but I'm not really sure what to do.

Let me know if any other information is needed.

Please Help!!
Posted
Updated 7-Dec-12 8:32am
v2
Comments
Zoltán Zörgő 7-Dec-12 15:58pm    
And what is the common difference between those PCs, that can connect and those that can not? First of all, I suggest you check with Sysinternals's PROCEXP (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) to see where the TCP session is failing. If these PCs are on the same network, it is possible to be a firewall issue...

1 solution

This technet article How to Troubleshoot Connecting to the SQL Server Database Engine[^] might help you troubleshoot the problem.
 
Share this answer
 
Comments
Dustin Prevatt 7-Dec-12 15:02pm    
Thanks, I have tried those steps before and still can't connect.
Dustin Prevatt 11-Dec-12 10:26am    
Turns out this was a dns issue on my end. Thanks for the help!

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