Click here to Skip to main content
15,908,115 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Quote:
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)
Posted
Updated 8-Jul-14 16:47pm
v2
Comments
George Jonsson 8-Jul-14 22:40pm    
Well, what kind of trouble shooting have you done already?
IS the server up and running, for example?
DamithSL 8-Jul-14 22:50pm    
Google[^] and try to find solution. you need to ask specific question and add more details what you have already tried etc..

Check your connection string again.This link may help you.I assume you are using SQL server 2008

http://www.connectionstrings.com/sql-server-2008/[^]

and check this post too...

Connect to remote SQL database with Visual C#[^]
 
Share this answer
 
This error because of problem in your connection string. please check the detail provided in connection string. have a look of this link for connection string with sql

https://www.connectionstrings.com/sql-server-2008/[^]
 
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