SetPassword Method
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
The SetPassword method changes the password for the referenced login.
구문
object.SetPassword(OldValue,NewValue)
Parts
object
Expression that evaluates to an object in the Applies To list.OldValue
String that specifies the current password string.NewValue
String that specifies a new password for the login record.
Prototype (C/C++)
HRESULT SetPassword(
SQLDMO_LPCSTR OldValue,
SQLDMO_LPCSTR NewValue);
주의
Use the SetPassword method to alter a password for a login record used by SQL Server Authentication only.
The current password need not be known when setting a new password using the SetPassword method. Use an empty string to specify no password for either the existing password or a new password for the login.
Changing Microsoft SQL Server login passwords using the SetPassword method requires appropriate permissions. The SQL Server login used for SQLServer object connection must be a member of the fixed role sysadmin.