Try looking at the connection string in VS.
1) Open the Server Explorer pane.
2) If you do not have a connection to your database, create one
2.1) Right click on "Data connections" and select "Add Connection..."
2.2) Follow the dialog instructions.
3) Once you have your connection, highlight the database name and look at the Properties pane.
4) The Connections string is the one that VS is using, and that it knows works. You can copy'n'paste that into your settings, or application directly.
Generally, I use:
using (SqlConnection con = new SqlConnection(myConnectionString))
{
con.Open();
...
}
Just to be sure.