RigEssedeSics
New Member
I'm pretty new to c# asp.net etc so bear with me
I've been looking on the internet for the right syntax so I can connect to my database which is on my computer.I've tried this:\[code\] SqlConnection myConnection = new SqlConnection("server=localhost;" + "Trusted_Connection=yes;" + "database=mmcinfo.mdf;");\[/code\]But i get an error on the myConnection.Open(); saying:\[quote\] SqlException was unhandled by user code 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)\[/quote\]I know im doing something wrong in calling the right database/server etc but i havent got a clue how to fix this.
