Save them to a config file:
1) Open your projects Properties in the solution explorer, and double click on "Settings.settings"
2) In the resulting grid, change the Name to "ConnectionString", and set the Value to blank. Leave Type and Scope as "string" and "User" respectively.
3) Save and close the settings window.
4) To read your setting:
Dim s as string = Properties.Settings.Default.ConnectionString
5) To write your setting:
Properties.Settings.Default.ConnectionString = "My new setting value"
Properties.Settings.Default.Save()
The connection details will be saved in an XML file that is nice and easy for external programs to edit if necessary.