Type Indicators in an ANSI SQL Provider

This table shows how an ANSI SQL provider might map its data types to OLE DB data types.

SQL data type

OLE DB type indicator

CHAR (n)

DBTYPE_STR

VARCHAR (n)

DBTYPE_STR

CLOB

DBTYPE_STR

DECIMAL (p, s)

DBTYPE_NUMERIC

NUMERIC (p, s)

DBTYPE_NUMERIC

BIT

DBTYPE_BOOL

TINYINT

DBTYPE_I1

SMALLINT

DBTYPE_I2

INTEGER

DBTYPE_I4

BIGINT

DBTYPE_I8

REAL

DBTYPE_R4

FLOAT

DBTYPE_R8

DOUBLE PRECISION

DBTYPE_R8

BINARY (n)

DBTYPE_BYTES

VARBINARY (n)

DBTYPE_BYTES

BLOB

DBTYPE_BYTES

DATE

DBTYPE_DBDATE

TIME

DBTYPE_DBTIME

TIMESTAMP

DBTYPE_DBTIMESTAMP