Data type mappings
HCL Informix® OLE DB Provider supports data type mappings between Informix data types and OLE DB data types.
The support for data type mappings between Informix and OLE DB data types are shown in the following table.
The data type shown in the column headed MSDASQL>ODBC 3.80 Type is the type that the Informix data type maps to when you use the Microsoft OLE DB to ODBC bridge.
Informix data type | OLE DB Provider type before version 2.8 | MSDASQL>ODBC 3.80 type | Current® OLE DB Provider type |
---|---|---|---|
BIGINT | None | DBTYPE_I8 | DBTYPE_I8 |
BIGSERIAL | None | DBTYPE_UI8 | DBTYPE_I8 |
BLOB | DBTYPE_BYTES | DBTYPE_BYTES | DBTYPE_BYTES |
BOOLEAN | DBTYPE_BOOL | DBTYPE_BOOL | DBTYPE_BOOL |
BYTE | DBTYPE_BYTES | DBTYPE_BYTES | DBTYPE_BYTES |
CHAR | DBTYPE_STR | DBTYPE_STR | DBTYPE_STR |
CLOB | DBTYPE_STR | DBTYPE_STR | DBTYPE_STR |
DATE | DBTYPE_DBDATE | DBTYPE_DBDATE | DBTYPE_DBDATE |
DATETIME | DBTYPE_DBTIMESTAMP | DBTYPE_DBTIMESTAMP Except: DATETIME YEAR TO DAY maps to DBTYPE_DBDATE DATETIME HOUR TO SECOND maps to DBTYPE_DBTIME |
DBTYPE_DBDATE or DBTYPE_DBTIME or DBTYPE_DBTIMESTAMP |
DECIMAL | DBTYPE_VARNUMERIC | DBTYPE_NUMERIC | DBTYPE_NUMERIC |
DISTINCT | Same as underlying type | Same as underlying type | Same as underlying type |
FLOAT | DBTYPE_R8 | DBTYPE_R8 | DBTYPE_R8 |
INT8 | DBTYPE_I8 | DBTYPE_I8 | DBTYPE_I8 |
INTEGER | DBTYPE_I4 | DBTYPE_I4 | DBTYPE_I4 |
INTERVAL | DBTYPE_NUMERIC | DBTYPE_BYTES | DBTYPE_STR |
LIST | DBTYPE_VARIANT | DBTYPE_STR | DBTYPE_VARIANT |
LVARCHAR | DBTYPE_STR | DBTYPE_STR | DBTYPE_STR |
MONEY (p<=19 s<=4) | DBTYPE_NUMERIC | DBTYPE_CY | DBTYPE_CY |
MONEY (p>19 s<>4) | DBTYPE_NUMERIC | DBTYPE_NUMERIC | DBTYPE_NUMERIC |
MULTISET | DBTYPE_VARIANT | DBTYPE_STR | DBTYPE_VARIANT |
NCHAR | DBTYPE_STR | DBTYPE_STR | DBTYPE_STR |
OPAQUE | DBTYPE_BYTES | DBTYPE_BYTES | DBTYPE_BYTES |
Named ROW | DBTYPE_VARIANT | DBTYPE_STR | DBTYPE_VARIANT |
Unnamed ROW | Same as underlying type | DBTYPE_STR | DBTYPE_VARIANT |
SERIAL | DBTYPE_I4 | DBTYPE_I4 | DBTYPE_I4 |
SERIAL8 | DBTYPE_I8 | DBTYPE_UI8 | DBTYPE_I8 |
SET | DBTYPE_VARIANT | DBTYPE_STR | DBTYPE_VARIANT |
SMALLFLOAT | DBTYPE_R4 | DBTYPE_R4 | DBTYPE_R4 |
SMALLINT | DBTYPE_I2 | DBTYPE_I2 | DBTYPE_I2 |
TEXT | DBTYPE_STR | DBTYPE_STR | DBTYPE_STR |
VARCHAR | DBTYPE_STR | DBTYPE_STR | DBTYPE_STR |