SqlConnectionStringBuilder Clas


Provides a simple way to create and manage the contents of connection strings used by the SqlConnection class.

need Password stored in Connection Object {SQlclient -> SqlConnetion}. No, you can't as SqlConnection Object Doesn't have Property to Return Password Stored.

To Overcome this you can use, SQLConnectionStringBuilder Class. 

Code to do so


Dim builder As New SqlConnectionStringBuilder(strConnection)
Dim ConnUser,ConnPassword as String
ConnUser = builder.UserID

ConnPassword = builder.Password




Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)