Initialization Properties

The DBPROPSET_DBINIT property set contains the following properties. All of these properties are in the INITIALIZATION property group.

Property ID (Properties not supported in DBPROPSET_DBINIT) Description
DBPROP_AUTH_CACHE_AUTHINFO Type: VT_BOOL

Typical R/W: R Only

Description : Cache Authorization

Specifies values as either of:

  • VARIANT_TRUE, which indicates that the data source object or enumerator is allowed to cache sensitive authentication information, such as a password, in an internal cache.

  • VARIANT_FALSE , which indicates that the data source object or enumerator is not allowed to cache sensitive authentication information.
DBPROP_AUTH_ENCRYPT_PASSWORD Type: VT_BOOL

Typical R/W: R Only

Description: Encrypt Password

Specifies values as either of:

  • VARIANT_TRUE, which indicates that the consumer requires that the password be sent to the data source or enumerator in an encrypted form. This property uses cryptographic techniques, and as such specifies a stronger form of masking than DBPROP_AUTH_MASKPASSWORD.

  • VARIANT_FALSE, which indicates that the password can be sent without encryption.
DBPROP_AUTH_INTEGRATED Type: VT_BSTR

Typical R/W: Not supported

Description: Integrated Security

Specifies a string that contains the name of the authentication service used by the server. This is used to identify a user using an identity provided by an authentication domain. If the BSTR is a null pointer, this property is used and no other DBPROP_AUTH* properties are needed. If provided, their values are ignored.

DBPROP_AUTH_MASK_PASSWORD Type: VT_BOOL

Typical R/W: R Only

Description: Mask Password

Specifies values as either of:

  • VARIANT_TRUE, which indicates that the consumer requires that the password be sent to the data source or enumerator in a masked form.

  • VARIANT_FALSE, which indicates that the password can be sent in an unmasked form.
DBPROP_AUTH_PASSWORD Type: VT_BSTR

Typical R/W: R/W

Description: Password

Specifies the password to be used when connecting to the data source or enumerator. When the value of this property is retrieved with IDBProperties::GetProperties, the provider might return a mask, such as “******”, or an empty string, instead of the actual password. Note that the password is still set internally and is used when IDBInitialize::Initialize is called.

DBPROP_AUTH_PERSIST_ENCRYPTED Type: VT_BOOL

Typical R/W: R Only

Description: Persist Encrypted

Sepcifies values as either of:

  • VARIANT_TRUE, which indicates that the consumer requires the data source object to persist sensitive authentication information, such as a password, in encrypted form.

  • VARIANT_FALSE, which indicates that the data source object can persist sensitive authentication information without encryption.
DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO Type: VT_BOOL

Typical R/W: R Only

Description: Persist Security Info

Specifies values as either of:

  • VARIANT_TRUE, which indicates that the data source object is allowed to persist sensitive authentication information, such as a password, along with other authentication information.

  • VARIANT_FALSE, which indicates that the data source object cannot persist sensitive authentication information.
DBPROP_AUTH_USERID Type: VT_BSTR

Typical R/W: R/W

Description: User ID

Specifies the user ID to be used when connecting to the data source or enumerator.

DBPROP_INIT_ASYNCH Type: VT_I4

Typical R/W: R/W

Description: Asynchronous Processing

Specifies a bitmask that indicates the asynchronous processing performed on the rowset, that is, zero or more of:

  • DBPROPVAL_ASYNCH_INITIALIZE, which indicats that IDBInitialize::Initialize returns immediately, but the actual initialization of the data source is done asynchronously. The data source behaves as an uninitialized data source prior to completing the initialization process, except that any call to IDBInitialize returns E_UNEXPECTED.

If no bits are set (the default), IDBInitialize::Initialize does not return until the data source is completely initialized.

DBPROP_INIT_CONNECT Type: VT_BOOL

Typical R/W: Not Supported

Description: Connect

DBPROP_INIT_DATASOURCE Type: VT_BSTR

Typical R/W: R/W

Description: Data Source

Specifies the name of the database or enumerator to which to connect.

DBPROP_INIT_HWND Type: VT_I4

Typical R/W: R/W

Description: Window Handle

Specifies the window handle to be used if the data source object or enumerator needs to prompt for additional information.

DBPROP_INIT_IMPERSONATION_LEVEL Type: VT_I4

Typical R/W: Not Supported

Description: Impersonation Level

Specifies the level of impersonation that the server is allowed to use when impersonating the client. This property applies only to non–Remote Procedure Call (RPC) network connections. Remote Procedure Call provides similar impersonation levels. The values of this property correspond directly to the levels of impersonation that can be specified for authenticated RPC connections, but can be applied to connections other than authenticated RPC.

Specifies values as one of:

  • DB_IMP_LEVEL_ANONYMOUS, which indicates that the client is anonymous to the server. The server process cannot obtain identification information about the client and cannot impersonate the client.

  • DB_IMP_LEVEL_IDENTIFY, which indicates that the server can obtain the client’s identity. The server can impersonate the client for ACL checking but cannot access system objects as the client.

  • DB_IMP_LEVEL_IMPERSONATE, which indicates that the server process can impersonate the client’s security context while acting on behalf of the client. This information is obtained when the connection is established, not on every call.

  • DB_IMP_LEVEL_DELEGATE, which indicates that the process can impersonate the client’s security context while acting on behalf of the client. The server process can also make outgoing calls to other servers while acting on behalf of the client.
DBPROP_INIT_LCID Type: VT_I4

Typical R/W: R/W

Description: Locale Identifier

The locale ID (LCID) of preference for the consumer. Consumers specify the LCID at initialization. This provides a method by which the server can determine the consumer’s LCID of choice . This property does not guarantee that all text returned to the consumer will be translated according to the LCID.

Providers may wish to set dwOptions in the DBPROP structure for this property to DBPROPOPTIONS_SETIFCHEAP.

DBPROP_INIT_LOCATION Type: VT_BSTR

Typical R/W: Not Supported

Description: Location

Specifies the location of the data source or enumerator to which to connect. Typically, this will be a server name.

DBPROP_INIT_MODE Type: VT_I4

Typical R/W: R/W

Description: Mode

Specifies a bitmask that indicates access permissions, that is, zero or more of:

  • DB_MODE_READ, which indicates Read only.

  • DB_MODE_WRITE, which indicates Write-only.

  • DB_MODE_READWRITE, which indicates read/write (DB_MODE_READ | DB_MODE_WRITE).

  • DB_MODE_SHARE_DENY_READ, which prevents others from opening in read mode.

  • DB_MODE_SHARE_DENY_WRITE, which prevents others from opening in write mode.

  • DB_MODE_SHARE_EXCLUSIVE, which prevents others from opening in read/write mode (DB_MODE_SHARE_DENY_READ | DB_MODE_SHARE_DENY_WRITE).

  • DB_MODE_SHARE_DENY_NONE, which indicates that neither read nor write access can be denied to others.
DBPROP_INIT_PROMPT Type: VT_I2

Typical R/W: R Only

Description: Prompt

Specifies whether to prompt the user during initialization, that is:

  • DBPROMPT_PROMPT, which indiates that the user is always prompted for initialization information.

  • DBPROMPT_COMPLETE, which prompts the user only if more information is needed.

  • DBPROMPT_COMPLETEREQUIRED, which prompts the user only if more information is needed. Does not allow the user to enter optional information.

  • DBPROMPT_NOPROMPT, which does not prompt the user.
DBPROP_INIT_PROTECTION_LEVEL Type: VT_I4

Typical R/W: Not Supported

Description: Protection Level

Specifies the level of protection for data sent between client and server. This property applies only to non–Remote Procedure Call (RPC) network connections. RPC provides similar protection levels. The values of this property correspond directly to the levels of protection that can be specified for authenticated RPC connections, but can be applied to connections other than authenticated RPC.

Specifies values as one of:

  • DB_PROT_LEVEL_NONE, which performs no authentication of data sent to server.

  • DB_PROT_LEVEL_CONNECT, which authenticates only when the client establishes the connection with the server.

  • DB_PROT_LEVEL_CALL, which authenticates the source of the data at the beginning of each request from the client to the server.

  • DB_PROT_LEVEL_PKT, which authenticates that all data received is from the client.

  • DB_PROT_LEVEL_PKT_INTEGRITY, which authenticates that all data received is from the client and that it has not been changed in transit.

  • DB_PROT_LEVEL_PKT_PRIVACY, which authenticates that all data received is from the client, that is, has not been changed in transit, and protects the privacy of the data by encrypting it.
DBPROP_INIT_PROVIDERSTRING Type: VT_BSTR

Typical R/W: R/W

Description: Extended Properties

Specifies a string that contains provider-specific, extended connection information. Use of this property implies that the consumer knows how this string will be interpreted and used by the provider. Consumers should use this property only for provider-specific connection information that cannot be explicitly described through the property mechanism.

DBPROP_INIT_TIMEOUT Type: VT_I4

Typical R/W: Not Supported

Description: Connect Timeout

Specifies the amount of time (in seconds) to wait for initialization to complete.