Persist Security Info Property

ADO and SQL Server

ADO and SQL Server

Persist Security Info Property

The Persist Security Info property specifies whether the data source can persist sensitive authentication information such as a password.

Applies To
Connection Object
Syntax

object.Properties("Persist Security Info") [= value]

Parts

object

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

value

Boolean that specifies whether the data source can persist authentication information, as specified in Settings.

Settings
Value Description
True The data source object can persist sensitive authentication information such as a password along with other authentication information.
False The data source object cannot persist sensitive authentication information.

Data Type

adBoolean

Modifiable

Read/write

OLE DB Property

DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO

Remarks

If Persist Security Info is set to False at the time the data source is initialized, the data source cannot persist sensitive authentication information. Furthermore, a call to a property that contains sensitive authentication information, such as a password, returns a default value instead of the actual password.

After the data source has been uninitialized, sensitive information that was set when the data source was initialized with the Persist Security Info property set to False still cannot be obtained from the Properties collection or by persisting the uninitialized data source object. However, new properties set after the data source object has been uninitialized can be persisted or obtained if Persist Security Info is set to True.

Before the data source is initialized for the first time, sensitive information can be obtained from the Properties collection, and can be persisted, regardless of the setting of the Persist Security Info property. Therefore, sensitive applications should avoid passing uninitialized data source objects.

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