SetPassword Method

SQLServer.Login Object

Description

Changes the password for this login. Note that because the password is encrypted, there is no way to read it from server.

Visual Basic

Login.SetPassword (
[OldPassword :=] idOldPassword,
[NewPassword :=] idNewPassword )

C++

HRESULT pLogin->SetPassword (
SQLOLE_LPCSTR
idOldPassword,
SQLOLE_LPCSTR idNewPassword );

Elements

Element Type Description

idOldPassword Identifier Old password
idNewPassword Identifier New password

Reference

sp_password