Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got an error when trying to use a sample using NOrthwind.

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)

Any idea how to resolve this problem?
Posted
Updated 31-May-11 20:06pm
v2

Start by posting the connection string you are using... The error message says it all really - you likely haven't used the correct instance name for your SQL Server.
 
Share this answer
 
Make sure you have proper access to the database server and that your user name and password are correct.
Ensure the server path is correct as well.
 
Share this answer
 
I think i have Not done the following!
This sample requires the Northwind sample database. For more information, see How to: Install and Troubleshoot Database Components for Samples.

I need a tutorial for this...
 
Share this answer
 
It might be surface area configuration error or sql service configuration issue. Have a look at this thread for potential reasons and resolutions: Resolving A network-related or instance-specific error occurred while establishing a connection to SQL Server[^]

If needed, See steps for setting up Surface area configuration here..

If this does not resolve your issue, have a look at these thread:
http://forums.asp.net/t/1334649.aspx[^]
SQL SERVER FIX ERROR (provider: Named Pipes [^]
Quite few possible reasons and resolutions are proposed here too.
 
Share this answer
 
I think you are connection to a not accessible sql server.
 
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