You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-tools/how-to-save-and-edit-connection-strings.md
+11-12Lines changed: 11 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -23,21 +23,20 @@ Connection strings in Visual Studio applications can be saved in the application
23
23
Storing sensitive information (such as the password) within the connection string can affect the security of your application. Connection strings saved to the application configuration file are not encrypted or obfuscated, so it may be possible for someone to access the file and view its contents. Using Windows Integrated Security is a more secure way to control access to a database.
24
24
25
25
If you do not choose to use Windows integrated security and your database requires a user name and password, you can omit them from the connection string, but your application will need to provide this information to successfully connect to the database. For example, you can create a dialog box that prompts the user for this information and dynamically builds the connection string at run time. Security can still be an issue if the information is intercepted on the way to the database.
26
-
For more information, see [Protecting Connection Information](https://msdn.microsoft.com/library/89211k9b.aspx).
For more information, see [Protecting Connection Information](/dotnet/framework/data/adonet/protecting-connection-information).
28
27
29
-
## To save a connection string from within the data wizards
30
-
Select the option to save the connection on the Save connection string to the application configuration file page.
28
+
## To save a connection string from within the Data Source Configuration Wizard
29
+
In the **Data Source Configuration Wizard**, select the option to save the connection on the Save the Connection String to the Application Configuration File page.
31
30
32
31
## To save a connection string directly into application settings
33
-
- In Solution Explorer double-click the My Project icon (Visual Basic) or Properties icon (C#) to open the Project Designer.
32
+
- In Solution Explorer, double-click the My Project icon (Visual Basic) or Properties icon (C#) to open the Project Designer.
34
33
- Select the Settings tab.
35
34
- Enter a Name for the connection string. Refer to this name when accessing the connection string in code.
36
35
- Set the Type to (Connection string).
37
36
- Leave the Scope set to Application.
38
37
- Type your connection string into the Value field, or click the ellipsis (...) button in the Value field to open the Connection Properties dialog box to build your connection string.
39
38
40
-
## Editing Connection Strings Stored in Application Settings
39
+
## Editing connection strings stored in application settings
41
40
You can modify connection information that is saved in application settings by using the Project Designer.
42
41
43
42
### To edit a connection string stored in application settings
@@ -46,18 +45,18 @@ You can modify connection information that is saved in application settings by u
46
45
- Locate the connection you want to edit and select the text in the Value field.
47
46
- Edit the connection string in the Value field, or click the ellipsis (...) button in the Value field to edit your connection with the Connection Properties dialog box.
48
47
49
-
## Editing Hard-Coded Connection Strings in Datasets
50
-
You can modify connection information that is saved in code by using the Creating and Editing Typed Datasets.
48
+
## Editing connection strings for datasets
49
+
You can modify connection information for each TableAdapter in a dataset.
51
50
52
-
### To edit a connection string stored in a Dataset
51
+
### To edit a connection string for a TableAdapter in a dataset
53
52
- In Solution Explorer, double-click the dataset (.xsd file) that has the connection you want to edit.
54
53
- Select the TableAdapter or query that has the connection you want to edit.
55
-
- In the Properties window expand the DefaultConnection node.
56
-
- To quickly modify the connection string, edit the ConnectionString property, or click the down arrow on the DefaultConnection property and choose New Connection.
54
+
- In the Properties window, expand the Connection node.
55
+
- To quickly modify the connection string, edit the ConnectionString property, or click the down arrow on the Connection property and choose New Connection.
57
56
58
57
## Security
59
58
Storing sensitive information (such as a password) within the connection string can affect the security of your application. Using Windows integrated security is a more secure way to control access to a database.
60
-
For more information, see Securing Connection Strings and ADO.NET Secure Coding Guidelines.
59
+
For more information, see [Protecting Connection Information](/dotnet/framework/data/adonet/protecting-connection-information).
61
60
62
61
## See Also
63
62
[Visual Studio data tools for .NET](../data-tools/visual-studio-data-tools-for-dotnet.md)
0 commit comments