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) 1≤ n ≤255 DBTYPE_STR
VARCHAR (n) 1≤ n ≤255 DBTYPE_STR
CLOB DBTYPE_STR
DECIMAL(p,s) DBTYPE_NUMERIC
NUMERIC(p,s) DBTYPE_NUMERIC
BIT DBTYPE_BOOL
TINYINT (signed) DBTYPE_I1
TINYINT (unsigned) DBTYPE_UI1
SMALLINT (signed) DBTYPE_I2
SMALLINT (unsigned) DBTYPE_UI2
INTEGER (signed) DBTYPE_I4
INTEGER (unsigned) DBTYPE_UI4
BIGINT (signed) DBTYPE_I8
BIGINT (unsigned) DBTYPE_UI8
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