I sent error message, this occurred when I connect local PC to server PC using sql connection
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Pls Give Me Solution
Loading

Nikhil Vats2 reputationPosted Jun 8, 2010, 4:12 AM EDT
Connection string should be like this.
Hope this code will help u.
Serban Cosmin59 reputationPosted Jun 8, 2010, 4:27 AM EDT
What kind of authentication are you using. If you are using SQL Server authentication rather than Windows authentication, then SQL Server must be configured to support SQL Server and Windows Authentication modes. If you have SQL Server management studio, you should right click on the server instance, open Properties and under Security verify the server authentication.
Hope this helps.
Dipa AhujaRank #1,168 · 1.5K reputationPosted Jun 8, 2010, 7:42 AM EDT
CrishRank #1,487 · 1.1K reputationPosted Jun 8, 2010, 9:18 AM EDT
for allow remote connections. ..pl do following process ..
Start - > Programs - > Microsoft SQL-2005 -> Configuration Tools -> SQL Server Surface Area Configuraiton -> Surface Area Configuaration for Services and Connections...
Set Local and Remote Connections and also set Using both TCP/IP and named pipes.
Then restart your pc.
thanks
Don't forget to Mark Do you like this Answer
that solved your problem!
Venkatesan JayakanthamRank #256 · 9.8K reputationPosted Jun 11, 2010, 5:07 AM EDT
http://venkattechnicalblog.blogspot.com/2008/06/sql-server-2005-connection-error.html
Cheers,
Venkatesan Prabu .J