Password Property

ADO and SQL Server

ADO and SQL Server

Password Property

The Password property specifies the password to be used when connecting to a data source.

Applies To
Connection Object
Syntax

object.Properties("Password") [= value]

Parts

object

Expression that evaluates to an object in the Applies To list.

value

String that contains the password.

Data Type

adBSTR

Modifiable

Read/write

OLE DB Property

DBPROP_AUTH_PASSWORD

Remarks

When the value of the Password property is retrieved, the provider might return a mask such as "******" or an empty string instead of the actual password. The password is still set internally and is used when the Open method is called.

An ADO application can also use the OLE DB Pwd keyword, which is equivalent to the Password property.

Note  The recommended method for connecting to an instance of Microsoft® SQL Server™ 2000 is to use Windows Authentication mode.