How to: Edit a Connection String
Connection strings stored in an application are either saved in the application configuration file (application settings) or compiled in the code (typically as the ConnectionString property of a connection object). Data connections created with the Data Source Configuration Wizard give you the option to store connection strings in the applications settings file, or to hard-code them in the dataset definition.
You can modify connection information that is saved in application settings by using the Project Designer.
To edit a connection string stored in application settings
Select the Settings tab.
Locate the connection you want to edit and select the text in the Value box.
Edit the connection string in the Value box.
Click the ellipses in the Value box to edit your connection with the Connection Properties dialog box. For more information, see Add/Modify Connection Dialog Box (General).
You can modify connection information that is saved in code by using the Dataset Designer.
To edit a connection string stored in code
In Solution Explorer, double-click the dataset (.xsd file) with the connection you want to edit.
Select the TableAdapter or query with the connection you want to edit.
In the Properties window expand the DefaultConnection node.
To quickly modify the connection string, edit the ConnectionString property.
Click the down arrow on the DefaultConnection property and choose New Connection to open the Add/Modify Connection Dialog Box (General).
Storing sensitive information (such as a password) can affect the security of your application. Using Windows Authentication (also known as integrated security) is a more secure way to control access to a database. For more information, see Protecting Connection Information (ADO.NET).