V
Vicky
I have installed both SQL and visual studio 2005 in my computer having
vista. I tried to establish the database connection using this code:
SqlConnection conn = new SqlConnection("data source= VICKY-PC//
SQLEXPRESS; integrated security=yes;initial
catalog=master;Trusted_Connection=yes");
conn.Open();
But it is not working. It throws a run time error "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)"
Can anyone tell me how to establish connection?? Plse give me brief
description as i am a beginner...
vista. I tried to establish the database connection using this code:
SqlConnection conn = new SqlConnection("data source= VICKY-PC//
SQLEXPRESS; integrated security=yes;initial
catalog=master;Trusted_Connection=yes");
conn.Open();
But it is not working. It throws a run time error "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)"
Can anyone tell me how to establish connection?? Plse give me brief
description as i am a beginner...