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 theproperty of a connection object). Data connections created with the give you the option to store connection strings in the applications settings file, or to hard-code them in the dataset definition.
Editing Connection Strings Stored in Application Settings
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
In Project Designer., double-click the My Project icon (Visual Basic) or Properties icon (Visual C# or Visual J#) to open the
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.
Editing Hard-Coded Connection Strings
You can modify connection information that is saved in code by using the.
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.
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.