Trouble with attaching data into a database

I have just started using Visual Studio and I am trying to program an application to send information to a SQL database. I keep getting this error message and cannot figure out how to fix the problem:

System.Data.SqlClient.SqlException was unhandled
Class=20
ErrorCode=-2146232060
LineNumber=0
Message="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)"

Could someone please help me fix this error

Thank you,

Anthony Ostrem



Answer this question

Trouble with attaching data into a database