Password Property (SQL-DMO)

The Password property indicates a password for a Microsoft® SQL Server™ login record.

Applies To
DatabaseRole Object SQLServer Object
RegisteredServer Object  

Syntax

object.Password [= value]

Part Description
object Expression that evaluates to an object in the Applies To list
value String

Remarks

Use the Password property of the DatabaseRole object to set the password for an application role. For more information about security based on application roles, see Application Security and Application Roles.

For the RegisteredServer object, the Password property provides the password used when a connection is made by using the default login.

For the SQLServer object, the Password property provides the password used for a connection made with SQL Server Authentication.

Data Type

String

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetPassword(SQLDMO_LPBSTR pRetVal);

HRESULT SetPassword(SQLDMO_LPCSTR NewValue);


Note SQL-DMO strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference by using SysFreeString.


  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.