Skip to content

Commit 641892c

Browse files
Remove password (#2928)
1 parent 2e163b2 commit 641892c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/snippets/Microsoft.Data.SqlClient/SqlConnectionStringBuilder.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@
6969
// Pass the SqlConnectionStringBuilder an existing
7070
// connection string, and you can retrieve and
7171
// modify any of the elements.
72-
builder.ConnectionString = "server=(local);user id=ab;" +
73-
"password= a!Pass113;initial catalog=AdventureWorks";
72+
builder.ConnectionString = "server=(local);integrated security=SSPI;
73+
initial catalog=AdventureWorks";
7474

7575
// Now that the connection string has been parsed,
7676
// you can work with individual items.
77-
Console.WriteLine(builder.Password);
78-
builder.Password = "new@1Password";
77+
Console.WriteLine(builder.InitialCatalog);
78+
builder.InitialCatalog = "Northwind";
7979

8080
// You can refer to connection keys using strings,
8181
// as well. When you use this technique (the default

0 commit comments

Comments
 (0)