This:
SqlConnection myConnection = new SqlConnection("Data Source=(LocalDB)\v11.0;AttachDbFilename='C:\\Users\\Joe\\Documents\\Visual Studio 2012\\Projects\\FileIO\\FileIO\\Database.mdf';Integrated Security=True");
try
{
myConnection.Open();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Returns this error:
A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll System.Data.SqlClient.SqlException: 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)
Any Ideas?