ChangePassword method

Changes the password for the user indicated in the connection string to the supplied new password.

Syntax
Visual Basic

Public Shared Sub ChangePassword( _
   ByVal connectionString As String, _
   ByVal newPassword As String _
)
C#

public static void ChangePassword(
   string  connectionString,
   string  newPassword
);
Parameters
  • connectionString   The connection string that contains enough information to connect to the database server that you want. The connection string may contain the user ID and the current password.

  • newPassword   The new password to set. This password must comply with any password security policy set on the server, including minimum length, requirements for specific characters, and so on.

See also