PROVIDER_TYPES Rowset

The PROVIDER_TYPES rowset identifies the (base) data types supported by the data provider.

The PROVIDER_TYPES rowset contains the following columns:

Column name Type indicator Description
TYPE_NAME DBTYPE_WSTR Provider-specific data type name.
DATA_TYPE DBTYPE_UI2 The indicator of the data type.
COLUMN_SIZE DBTYPE_UI4 The length of a non-numeric column or parameter refers to either the maximum or the defined length for this type by the provider. For character data, this is the maximum or defined length in characters.

If the data type is numeric, this is the upper bound on the maximum precision of the data type. For the maximum precision of the data type.

LITERAL_PREFIX DBTYPE_WSTR Character or characters used to prefix a literal of this type in a text command.
LITERAL_SUFFIX DBTYPE_WSTR Character or characters used to suffix a literal of this type in a text command.
CREATE_PARAMS DBTYPE_WSTR The creation parameters are specified by the consumer when creating a column of this data type. For example, the SQL data type DECIMAL needs a precision and a scale. In this case, the creation parameters might be the string “precision, scale.” In the text command to create a DECIMAL column with a precision of 10 and a scale of 2, the value of the TYPE_NAME column might be DECIMAL() and the complete type specification would be DECIMAL(10,2).

The creation parameters appear as a comma-separated list of values, in the order they are to be supplied, with no surrounding parentheses. If a creation parameter is length, maximum length, precision, or scale, “length,” “max length,” “precision,” and “scale” should be used, respectively. If the creation parameters are some other value, it is provider-specific what text is used to describe the creation parameter.

If the data type required creation parameters, “()” generally appears in the type name. This indicates the position at which to insert the creation parameters. If the type name does not include “()”, the creation parameters are enclosed in parentheses and appended to the end of the data type name.

IS_NULLABLE DBTYPE_BOOL Specifies values as:
  • VARIANT_TRUE, which indicates that the data type is nullable.

  • VARIANT_FALSE, which indicates that the data type is not nullable.

  • NULL, which indicates that it is not known whether the data type is nullable.
CASE_SENSITIVE DBTYPE_BOOL Specifies values as either of:
  • VARIANT_TRUE, which indicates that the data type is a character type and is case sensitive.

  • VARIANT_FALSE, which indicates that the data type is not a character type or is not case sensitive.
SEARCHABLE DBTYPE_UI4 If the provider supports ICommandText, then this column is an integer indicating the searchability of a data type. Otherwise, this column is NULL. Specifies values as one of:
  • DB_UNSEARCHABLE, which indicates that the data type cannot be used in a WHERE clause.

  • DB_LIKE_ONLY, which indicates that the data type can be used in a WHERE clause only with the LIKE predicate.

  • DB_ALL_EXCEPT_LIKE, which indicates that the data type can be used in a WHERE clause with all comparison operators except LIKE.

  • DB_SEARCHABLE, which indicates that the data type can be used in a WHERE clause with any comparison operator.
UNSIGNED _ATTRIBUTE DBTYPE_BOOL Specifies values as:
  • VARIANT_TRUE, which indicates that the data type is unsigned.

  • VARIANT_FALSE, which indicates that the data type is signed.

  • NULL, which indicates that it is not applicable to data type.
FIXED_PREC_SCALE DBTYPE_BOOL Specifies values as one of:
  • VARIANT_TRUE, which indicates that the data type has a fixed precision and scale.

  • VARIANT_FALSE, which indicates that the data type does not have a fixed precision and scale.
AUTO_UNIQUE_VALUE DBTYPE_BOOL Specifies values as one of:
  • VARIANT_TRUE, which indicates that values of this type can be autoincrementing.

  • VARIANT_FALSE, which indicates that values of this type cannot be autoincrementing.
LOCAL_TYPE_NAME DBTYPE_WSTR Localized version of TYPE_NAME. NULL is returned if a localized name is not supported by the data provider.
MINIMUM_SCALE DBTYPE_I2 If the type indicator is DBTYPE_DECIMAL or DBTYPE_NUMERIC, this is the minimum number of digits allowed to the right of the decimal point. Otherwise, this is NULL.
MAXIMUM_SCALE DBTYPE_I2 If the type indicator is DBTYPE_DECIMAL or DBTYPE_NUMERIC, this is the maximum number of digits allowed to the right of the decimal point. Otherwise, this is NULL.
GUID DBTYPE_GUID The GUID of the type. All types supported by a provider are described in a type library, so each type has a corresponding GUID.
TYPELIB DBTYPE_WSTR The type library containing the description of this type.
VERSION DBTYPE_WSTR The version of the type definition. Providers may wish to indicate version type definitions. Different providers may use different version schemas, such as a timestamp or number (integer or float). NULL if not supported.
IS_LONG DBTYPE_BOOL This value determines the setting of the DBCOLUMNFLAGS_ISLONG flag returned by GetColumnInfo in IColumnsInfo and GetParameterInfo in ICommandWithParameters. Specifies values as one of:
  • VARIANT_TRUE, which indicates that the data type is a BLOB that contains very long data. The definition of very long data is provider-specific.

  • VARIANT_FALSE, which indicates that the data type is a BLOB that does not contain very long data or is not a BLOB.
BEST_MATCH DBTYPE_BOOL Specifies values as one of:
  • VARIANT_TRUE, which indicates that the data type is the best match between all data types in the data source and the OLE DB data type indicated by the value in the DATA_TYPE column.

  • VARIANT_FALSE, which indicates that the data type is not the best match.

For each set of rows in which the value of the DATA_TYPE column is the same, the BEST_MATCH column is set to VARIANT_TRUE in only one row.


Default Sort Order: DATA_TYPE.