2.3 Generic Keys

The following table specifies generic keys that can be used in a connection string.<1> When an OLE DB provider does not support a given generic key or if the key has an invalid value, the behavior of the OLE DB provider is provider-specific.<2>

Key

Meaning

Provider

Specifies the name of the OLE DB provider.<3>

Cache Authentication

Specifies whether authentication information can be stored in a cache of the OLE DB provider. The valid values are "true" and "false".

Encrypt Password

Specifies whether the password is encrypted before it is sent to the data source. The valid values are "true" and "false".

Integrated Security

Specifies the name of the Authentication Service (AS) that the data source uses to identify the user who is using the identity that is provided by an authentication domain.<4>

Mask Password

Specifies whether the password cannot be sent to the data source in plaintext. The valid values are "true" and "false".

Password

Specifies the password to be used when connecting to the data source.

Persist Encrypted

Specifies whether the OLE DB consumer requests authentication information to be encrypted if the connection string is persisted.<5> The valid values are "true" and "false".

Persist Security Info

Specifies whether authentication information can be persisted by the OLE DB provider. The valid values are "true" and "false".

User ID

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

Asynchronous Processing

Specifies the asynchronous processing operations that the OLE DB consumer requests to be performed on the data source object. This key can have a compound value. Only the following value component is valid:

"Initialize": Specifies that the data source object is initialized asynchronously.<6> The corresponding numeric value is 0x1.

Bind Flags

Reserved. This key MUST NOT be used.

Initial Catalog

Specifies the name of the database to be used after the connection is established.

Data Source

Specifies the name of the data source to which to connect.<7>

General Timeout

Specifies the number of seconds before a request for a data source object times out. The valid values are signed integers that range from greater than or equal to -2147483648 to less than or equal to 2147483647.

Window Handle

Specifies the element of a graphical user interface that a provider can use to prompt for additional connection information. The valid values are signed integers that range from greater than or equal to -2147483648 to less than or equal to 2147483647 on a 32-bit platform and that range from greater than or equal to -9223372036854775808 to less than or equal to 9223372036854775807 on a 64-bit platform.

Impersonation Level

Specifies the OLE DB consumer-requested impersonation level that is to be used by the data source when it is impersonating the data source object. For more information about impersonation levels, see [MSDN-CDIM].

The valid values are the following:

  • "Anonymous": Anonymous level. The corresponding numeric value is 0x0.

  • "Identify": Identify level. The corresponding numeric value is 0x1.

  • "Impersonate": Impersonate level. The corresponding numeric value is 0x2.

  • "Delegate": Delegate level. The corresponding numeric value is 0x3.

Locale Identifier

Specifies the language code identifier (LCID) to be sent to the data source.<8> The valid values are an LCID or one of the following predefined literals:

  • "User Default": The default LCID of the user of the OLE DB consumer.

  • "System Default": The default LCID of the system of the OLE DB consumer.

Location

Specifies the path to the data source.<9>

Lock Owner

Reserved. This key MUST NOT be used.

Mode

Specifies the mode in which the OLE DB consumer requests to open the data source. This key can have a compound value. The valid value components are the following:

  • "Read": Read-only access permission. The corresponding numeric value is 0x1.

  • "Write": Write-only access permission. The corresponding numeric value is 0x2.

  • "ReadWrite": Read/write access permission. The corresponding numeric value is 0x3.

  • "Share Deny Read": Prevents other data source open requests from opening a connection in read mode. The corresponding numeric value is 0x4.

  • "Share Deny Write": Prevents other data source open requests from opening a connection in write mode. The corresponding numeric value is 0x8.

  • "Share Exclusive": Prevents other data source open requests from opening a connection in read/write mode. The corresponding numeric value is 0xC.

  • "Share Deny None": Specifies that neither read nor write access can be denied to other data source open requests. The corresponding numeric value is 0x10.

OLE DB Services

Specifies the services that the OLE DB consumer requests the OLE DB Services component to enable or disable for the data source object. For more information about OLE DB Services, see [MSDN-ODBS].

This key can have a compound value. The valid value components are the following:

  • "ResourcePooling": Resource pooling is enabled. The corresponding numeric value is 0x1.

  • "TxnEnlistment": Sessions in a Component Services environment are automatically enlisted in a global transaction where required. For more information about component services and global transactions, see [MSDN-COMCS]. The corresponding numeric value is 0x2.

  • "ClientCursor": The Client Cursor Engine is enabled.<10> For more information about the client-side cursor, see [MSDN-CSOLEDB]. The corresponding numeric value is 0x4.

  • "AgrAfterSession": Services that operate beyond the session level, including the Client Cursor Engine, are enabled. The corresponding numeric value is 0x8.

  • "EnableAll": All services are enabled. The corresponding numeric value is 0xFFFFFFFF.

  • "DisableAll": All services are disabled. The corresponding numeric value is 0x0.

Prompt

Specifies the OLE DB consumer-requested level of prompting for connection information during initialization of a data source object. The connection information that is required is provider-specific. The valid values are the following:

  • "Prompt": Always prompt for connection information. The corresponding numeric value is 0x1.

  • "Complete": Prompt only if the connection string does not contain sufficient information to establish a connection. The corresponding numeric value is 0x2.

  • "CompleteRequired": Prompt only for required information if more required information is needed. The corresponding numeric value is 0x3.

  • "NoPrompt": Do not prompt for connection information. The corresponding numeric value is 0x4.

Protection Level

Specifies the OLE DB consumer-requested level of protection for the data that is sent between a data source object and a data source. This key applies only to network connections other than remote procedure call (RPC) connections. The valid values are the following:

  • "None": Performs no authentication of data sent to the data source. The corresponding numeric value is 0x0.

  • "Connect": Authenticates only when the data source object establishes the connection with the data source. The corresponding numeric value is 0x1.

  • "Call": Authenticates the source of the data at the beginning of each request from the data source object to the data source. The corresponding numeric value is 0x2.

  • "Pkt": Verifies that all data received is from the data source object. The corresponding numeric value is 0x3.

  • "Pkt Integrity": Verifies that all data received is from the data source object and that it has not been changed in transit. The corresponding numeric value is 0x4.

  • "Pkt Privacy": Verifies that all data received is from the data source object and that it has not been changed in transit, and encrypts the data. The corresponding numeric value is 0x5.

Extended Properties

Specifies provider-specific extended connection information.

Connect Timeout

Specifies the amount of time, in seconds, to wait for a connection to complete. The valid values are signed integers that range from greater than or equal to -2147483648 to less than or equal to 2147483647.