|
|
|
|
|
|
How to Change SQL Server Database Password
|
If you are connecting SQL Server Database from .NET Applications using a Connection string and you want to change the database password from your C# or VB.NET code, you can use ChangePassword method of SqlConnection class.
|
string conStrWithOldPassword = "Server=Test; Database=Test; uid=test; pwd=oldpassword;
string newPassword = "newpassword";
SqlConnection.ChangePassword(conStrWithOldPassword, newPassword);
|
RELATED HOW TOs
|
How to check whether Database Connection is Open
|
|
|
|
|
|
|
|
|
|
|
|
|