Udostępnij za pośrednictwem


PROVIDER_TYPES Rowset

GUID: DBSCHEMA_PROVIDER_TYPES

Number of restriction columns: 2

Restriction columns: DATA_TYPE, BEST_MATCH

Default sort order: DATA_TYPE

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

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 length defined for this type by the provider. For character data, this is the maximum or defined length in characters. For datetime data types, this is the length of the string representation (assuming the maximum allowed precision of the fractional seconds component).

If the data type is numeric, this is the upper bound on the maximum precision of the data type. For the maximum precision of all numeric data types, see Precision of Numeric Data Types in Appendix A.

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 a 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 and with no surrounding parentheses. If a creation parameter is length, maximum length, precision, scale, seed, or increment "length", "max length", "precision", "scale", "seed", and "increment" 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 requires creation parameters, "()" usually 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 data type name.

IS_NULLABLE

DBTYPE_BOOL

VARIANT_TRUE ? The data type is nullable.

VARIANT_FALSE ? The data type is not nullable.

NULL ? It is not known whether the data type is nullable.

CASE_SENSITIVE

DBTYPE_BOOL

VARIANT_TRUE ? The data type is a character type and is case-sensitive.

VARIANT_FALSE ? The data type is not a character type or is not case-sensitive.

SEARCHABLE

DBTYPE_UI4

If the provider does not support ICommandText, this column is NULL. If the provider supports ICommandText, this column is an integer that represents one of the following options for the searchability of a data type: .

DB_UNSEARCHABLE ? The data type cannot be used in a WHERE clause.

DB_LIKE_ONLY ? The data type can be used in a WHERE clause only with the LIKE predicate.

DB_ALL_EXCEPT_LIKE ? The data type can be used in a WHERE clause with all comparison operators except LIKE.

DB_SEARCHABLE ? The data type can be used in a WHERE clause with any comparison operator.

UNSIGNED_ATTRIBUTE

DBTYPE_BOOL

VARIANT_TRUE ? The data type is unsigned.

VARIANT_FALSE ? The data type is signed.

NULL ? Not applicable to data type.

FIXED_PREC_SCALE

DBTYPE_BOOL

VARIANT_TRUE ? The data type has a fixed precision and scale.

VARIANT_FALSE ? The data type does not have a fixed precision and scale.

AUTO_UNIQUE_VALUE

DBTYPE_BOOL

VARIANT_TRUE ? Values of this type can be autoincrementing.

VARIANT_FALSE ? Values of this type cannot be autoincrementing.

If this value is VARIANT_TRUE, whether or not a column of this type is always autoincrementing depends on the provider's DBPROP_COL_AUTOINCREMENT column property. If the DBPROP_COL_AUTOINCREMENT property is read/write, whether or not a column of this type is autoincrementing depends on the setting of the DBPROP_COL_AUTOINCREMENT property. If DBPROP_COL_AUTOINCREMENT is a read-only property, either all or none of the columns of this type are 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_VARNUMERIC, 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_VARNUMERIC, 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

Intended for future use. The GUID of the type, if the type is described in a type library. Otherwise NULL.

TYPELIB

DBTYPE_WSTR

Intended for future use. The type library containing the description of the type, if the type is described in a type library. Otherwise NULL.

VERSION

DBTYPE_WSTR

Intended for future use. The version of the type definition. Providers might want to version type definitions. Different providers might use different versioning schemes, such as a timestamp or number (integer or float). NULL if not supported.

IS_LONG

DBTYPE_BOOL

VARIANT_TRUE ? The data type is a BLOB that contains very long data; the definition of very long data is provider-specific.

VARIANT_FALSE ? The data type is a BLOB that does not contain very long data or is not a BLOB.

This value determines the setting of the DBCOLUMNFLAGS_ISLONG flag returned by GetColumnInfo in IColumnsInfo and GetParameterInfo in ICommandWithParameters. For more information, see GetColumnInfo, GetParameterInfo, and Accessing BLOB Data.

BEST_MATCH

DBTYPE_BOOL

VARIANT_TRUE ? The data type is the best match between all data types in the data store and the OLE DB data type indicated by the value in the DATA_TYPE column.

VARIANT_FALSE ? 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.

IS_FIXEDLENGTH

DBTYPE_BOOL

VARIANT_TRUE ? Columns of this type created by the data definition language (DDL) will be of fixed length.

VARIANT_FALSE ? Columns of this type created by the DDL will be of variable length.

If the field is NULL, it is not known whether the provider will map this field with a fixed-length or variable-length column.