sever not found or not accesible

Posted by Parthibansk under Sql Server on 8/16/2012 | Points: 10 | Views : 735 | Status : [Member] | Replies : 2
when i use connection string in asp.net n run the page i get dis error..


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 got two sqlsever instances running..

default i use windows authentication...

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=sa;Initial Catalog=EMPLOYEE;Data Source=PARTHI-PC\SQLEXPRESS




Responses

Posted by: San.Pblr.Gct on: 8/16/2012 [Member] Starter | Points: 25

Up
0
Down
You no need to mention user id when you are using windows authentication. i.e. integrated security= true

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vasanthmvp on: 8/16/2012 [Member] Starter | Points: 25

Up
0
Down
hi,
If you are using Windows Authentication, then the connection string might not include User Id and Password.
Instead mention Trusted_Connection=true;

If you want know more about connection-strings: visit http://www.connectionstrings.com/.

Regards.

Awesome Coding !! :)

Parthibansk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response