I have stored only the database location and database name in settings.settings file.I'm able to access the connection string from Settings.Settings file while debugging. But When i run the the executable it doesn't load the database that i used in connection string in setting.settings file.The user can dynamically changes the Settings file As per user need. My connection string is like-
public static string sd =System.AppDomain.CurrentDomain.BaseDirectory.ToString();
public static string co = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + sd +"\\Data\\"+ Properties.Settings.Default.db+".accdb";
Go to the properties of the project and make it application based instead of user based.
.The problem I'm facing now is if the user should dynamically change the settings.setting file
No the user cannot do this dynamically as the file is locked by the application. If the user makes a change, a restart of the application is required but then again the change can only occur when the file is not locked by the app.
There is no point in making a connection string user based unless each user should have different connection string.
EDIT
If you want to change the connection dynamically then either treat the settings file like an XML file and modify it or store the connection string in another source like a file or database.