Sunday, August 30, 2009

How to Edit a Connection String C#

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

  1. In Solution Explorer, double-click the My Project icon (Visual Basic) or Properties icon (Visual C# or Visual J#) to open the Project Designer.

  2. Select the Settings tab.

  3. Locate the connection you want to edit and select the text in the Value box.

  4. Edit the connection string in the Value box.

    -or-

    Click the ellipses in the Value box to edit your connection with the Connection Properties dialog box. For more information.

You can modify connection information that is saved in code by using the Dataset Designer.

To edit a connection string stored in code

  1. In Solution Explorer, double-click the dataset (.xsd file) with the connection you want to edit.

  2. Select the TableAdapter or query with the connection you want to edit.

  3. In the Properties window expand the DefaultConnection node.

  4. To quickly modify the connection string, edit the ConnectionString property.

No comments:

Post a Comment