Q:

connection string for SQL database by path For Desktop Application

I want a Connect .mdf file by path as we can do for Access db file
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=False;

A:

Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;
Trusted_Connection=Yes;

Best place to find Connection strings

