DBPROPINFO Structure

Providers use DBPROPINFO structures to return information about properties. An array of DBPROPINFO values is passed in a DBPROPINFOSET structure.

The DBPROPINFO structure is defined as follows:

typedef struct tagDBPROPINFO {
 LPOLESTR  pwszDescription;
 DBPROPID  dwPropertyID;
 DBPROPFLAGS dwFlags;
 VARTYPE   vtType;
 VARIANT   vValues;
} DBPROPINFO;

The elements of this structure are used as described in the following table.

Elements of DBPROPINFO structure

Element Description
pwszDescription A text description of the property. For properties defined by OLE DB, this should be the description listed for the property in Appendix C, "OLE DB Properties." The property description is used to construct stringed connection information and should not be localized.
dwPropertyID The ID of the property.
dwFlags A bitmask that describes the property, such as the group it belongs to and whether it can be read from or written to. For more information, see "DBPROPFLAGS Enumerated Type" in this chapter.

If the property is not supported, this is DBPROPFLAGS_NOTSUPPORTED. In this case, pwszDescription is set to null, and vtType and vValues are set to indicate VT_EMPTY.

vtType The type indicator of the property. This is used in the vt element of the VARIANT structure passed in the DBPROP structure.
vValues A list of the supported values for the property. This list is returned only if the property can be set and either:
  • The property type is an integer and the possible values of the property are an enumerated type.

  • The property type is a string and the possible values form a small, well-defined set. The definition of a small, well-defined set is provider-specific. For example, the provider might return the list of possible authentication services (DBINIT_OPT_AUTH_INTEGRATED property), but not the list of possible user IDs (DBINIT_OPT_AUTH_USERID property).

If this list is returned, the vt element in vValues is VT_ARRAY combined with the type indicator returned in vtType. If this list is not returned, the vt element is VT_EMPTY. The consumer must free any memory pointed to by elements of vValues by calling VariantClear.