Hi Sam,
In the 2.0 framework it's common to store connection strings in the
project's default Settings file to be used by the 2.0 "Providers". Each
string must have a unique name. At runtime, your code can grab the
connection string from a property like this:
// C#
string connString = Properties.Settings.Default.ExampleConnectionString;
or if the user has selected the unique name from a list:
string namedConnString = lstConnectionStrings.SelectedText;
string connString = Properties.Settings.Default[namedConnString];
If you're using an earlier version than the 2.0 framework, then you could
fill a static (shared) Hashtable where the keys are unique names and the
values are the corresponding connection strings. Store the connection
strings in the AppSettings of your application's configuration file and load
them into the Hashtable when they are required. The singleton pattern will
be useful.