A lot of people prefer registry keys, but the ".net way" is to utilize the app.config of your application. On start up of your application, it will read the app.config file (in compile it's [yourappname].exe.config. To do this, just add an app.config file into your application, and add the following child node.
<AppSettings> <add key="connstring" value="yourNewConnectionString" /> </AppSettings>
Retrieval would go something like..
string connString = System.Configuration.ConfigurationSettings.AppSettings.Get("connstring");
Here's MSDN's rock your socks explanation. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriintroductiontoapplicationsettingstorage.asp |