다음을 통해 공유


ChangePassword 메서드 (String)

Changes the logon password that is used with standard authentication.

네임스페이스:  Microsoft.SqlServer.Management.Common
어셈블리:  Microsoft.SqlServer.ConnectionInfo(Microsoft.SqlServer.ConnectionInfo.dll)

구문

‘선언
Public Sub ChangePassword ( _
    newPassword As String _
)
‘사용 방법
Dim instance As ServerConnection
Dim newPassword As String

instance.ChangePassword(newPassword)
public void ChangePassword(
    string newPassword
)
public:
void ChangePassword(
    String^ newPassword
)
member ChangePassword : 
        newPassword:string -> unit 
public function ChangePassword(
    newPassword : String
)

매개 변수

주의

The login property must be set before this method may be called.

C#

ServerConnection conn = new ServerConnection();
conn.LoginSecure = false;
conn.Login = vlogin;
conn.password = vpassword;
conn.ChangePassword(newpassword);

PowerShell

$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
$conn.LoginSecure = $FALSE
$conn.Login = vlogin
$conn.Password = vpassword
$conn.ChangePassword newpassword

참고 항목

참조

관련 자료

Configuring SQL Server Access for SQL Server Authentication