Search
Categories
  ASP.NET
Visual C#
Visual Basic
.NET Framework
ADO.NET
AJAX
LINQ
Java
 
How To Rating
 
3.0 out of 5


Total Votes: 6
         
1 2 3 4 5
 




How to Change SQL Server Database Password

Author: Waqas Anwar - Posted Date: 06-June-2009 - Category: ADO.NET   
Bookmark and Share
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

LEAVE YOUR COMMENTS LEAVE YOUR COMMENTS
 Name (required)  
 Email (required
 Website


 

 


 
 
 

Categories

My Portfolio

Website Links


Copyright @ 2009 EzzyLearning.com