waffle

waffle

  • NA
  • 48
  • 0

sqlConnection problem

Mar 11 2007 12:53 PM
visual studio 2005 here's my connection.. SqlConnection connect = new SqlConnection("Data Source=localhost; Integrated Security=SSPI;" + "Initial Catalog=dbname";); i don't if this is the problem or what. i just created a database inside this visual studio which is the ms sql server. the error says... an error has occurred while establishing a connection to the server. when connecting to Sql Server 2005, the 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) i even tried allowing local and remote connection in the settings but still it doesn't work. and i think, i don't need to do that because I'm not connecting remotely. i don't know that's how i understand it.. pls help me! tnx

Answers (4)