Using connection As New SqlConnection(builder.ConnectionString)Ĭonsole.WriteLine("Database = " & connection.Database)Ĭonsole.WriteLine("Press any key to finish.") ' remove them from the connection string you mustĬonsole.WriteLine("Modified: " & builder.ConnectionString) ' associated property values to an empty string won't ' in order to reset the user ID and password back to their "Data Source=(local) User ID=ab Password=MyPassword " & _ĭim builder As New SqlConnectionStringBuilder(connectString)Ĭonsole.WriteLine("Original: " & builder.ConnectionString) New SqlConnection(builder.ConnectionString))Ĭonsole.WriteLine("Database = " + connection.Database) Ĭonsole.WriteLine("Press any key to finish.") remove them from the connection string you mustĬonsole.WriteLine("Modified: " + builder.ConnectionString) associated property values to an empty string won't in order to reset the user ID and password back to their New SqlConnectionStringBuilder(connectString) Ĭonsole.WriteLine("Original: " + builder.ConnectionString) "Data Source=(local) User ID=ab Password=MyPassword " + If you must use a password, do not include a hard-coded password in your application. In your applications, we recommend that you use Windows Authentication. This example includes a password to demonstrate how SqlConnectionStringBuilder works with connection strings.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |