I'm going to create a SQL Server database file (.MDF file) in Visual Studio 2012 (C#).
I'm working on a desktop application, I've added a new .MDF file to project, but I don't know what is my connection string, I get this error when I try to connect to my DB:
SqlConnection SQLConnection = new SqlConnection("Data Source=db\\ofoghdb.mdf");
SQLConnection.Open();
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I'm fairly familiar with SQL Server in web development, but I'm going to use it in a desktop (winform) app and I get above error