con.ConnectionString = "Server=.\\SQLExpress;AttachDbFilename=|DataDirectory|mynewproject.mdf;Trusted_Connection=True"
Use full path for AttachDbFileName=e:\data\mynewproject.mdf See more info http://msdn.microsoft.com/en-us/library/ms247257(v=vs.100).ASPX
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)