Data conversions from HCL Informix types to OLE DB types

Note: Truncation of data might occur in some cases.
Note: The 32 K LVARCHAR feature extends LVARCHAR columns to hold up to 32 K bytes of data. This feature requires HCL Informix side support for 32 K LVARCHAR, and only works with HCL Informix Version 9.4 or later.
Table 1. HCL Informix datatype compatibility with DBTYPE_EMPTY, DBTYPE_NULL, DBTYPE_RESERVED, and DBTYPE_I1.
  DBTYPE_EMPTY DBTYPE_NULL DBTYPE_RESERVED DBTYPE_I1
SMALLINT NO NO NO YES
INTEGER NO NO NO YES
INT8 NO NO NO YES
BIGINT NO NO NO YES
SERIAL NO NO NO YES
SERIAL8 NO NO NO YES
BIGSERIAL NO NO NO YES
NUMERIC NO NO NO YES
DECIMAL NO NO NO YES
FLOAT NO NO NO YES
SMALLFLOAT NO NO NO YES
MONEY NO NO NO YES
DATE NO NO NO NO
DATETIME NO NO NO NO
INTERVAL NO NO NO YES
CHAR NO NO NO YES
NCHAR NO NO NO YES
VARCHAR NO NO NO YES
NVARCHAR NO NO NO YES
LVARCHAR NO NO NO YES
CLOB NO NO NO NO
BLOB NO NO NO NO
ROW NO NO NO NO
SET NO NO NO NO
MULTISET NO NO NO NO
LIST NO NO NO NO
Table 2. HCL Informix datatype compatibility with DBTYPE_I2, DBTYPE_I4, DBTYPE_I8, and DBTYPE_UI1.
  DBTYPE_I2 DBTYPE_I4 DBTYPE_I8 DBTYPE_UI1
SMALLINT YES YES NO YES
INTEGER YES YES NO YES
INT8 YES YES NO YES
BIGINT YES YES NO YES
SERIAL YES YES NO YES
SERIAL8 YES YES NO YES
BIGSERIAL YES YES NO YES
NUMERIC YES YES NO YES
DECIMAL YES YES NO YES
FLOAT YES YES NO YES
SMALLFLOAT YES YES NO YES
MONEY YES YES NO YES
DATE NO NO NO NO
DATETIME NO NO NO NO
INTERVAL YES YES YES YES
CHAR YES YES YES YES
NCHAR YES YES YES YES
VARCHAR YES YES YES YES
NVARCHAR YES YES YES YES
LVARCHAR YES YES NO YES
CLOB NO NO NO NO
BLOB NO NO NO NO
ROW NO NO NO NO
SET NO NO NO NO
MULTISET NO NO NO NO
LIST NO NO NO NO
Table 3. HCL Informix datatype compatibility with DBTYPE_UI2, DBTYPE_UI4, DBTYPE_UI2, DBTYPE_UI8, and DBTYPE_R4.
  DBTYPE_UI2 DBTYPE_UI4 DBTYPE_UI8 DBTYPE_R4
SMALLINT YES YES NO YES
INTEGER YES YES NO YES
INT8 YES YES NO YES
BIGINT YES YES NO YES
SERIAL YES YES NO YES
SERIAL8 YES YES NO YES
BIGSERIAL YES YES NO YES
NUMERIC YES YES NO YES
DECIMAL YES YES NO YES
FLOAT YES YES NO YES
SMALLFLOAT YES YES NO YES
MONEY YES YES NO YES
DATE NO NO NO NO
DATETIME NO NO NO NO
INTERVAL YES YES YES NO
CHAR YES YES YES YES
NCHAR YES YES YES YES
VARCHAR YES YES YES YES
NVARCHAR YES YES YES YES
LVARCHAR YES YES NO YES
CLOB NO NO NO NO
BLOB NO NO NO NO
ROW NO NO NO NO
SET NO NO NO NO
MULTISET NO NO NO NO
LIST NO NO NO NO
Table 4. HCL Informix datatype compatibility with DBTYPE_R8, DBTYPE_CY, DBTYPE_DECIMAL, and DBTYPE_NUMERIC.
  DBTYPE_R8 DBTYPE_CY DBTYPE_DECIMAL DBTYPE_NUMERIC
SMALLINT YES YES YES YES
INTEGER YES YES YES YES
INT8 YES YES YES YES
BIGINT YES YES YES YES
SERIAL YES YES YES YES
SERIAL8 YES YES YES YES
BIGSERIAL YES YES YES YES
NUMERIC YES YES YES YES
DECIMAL YES YES YES YES
FLOAT YES YES YES YES
SMALLFLOAT YES YES YES YES
MONEY YES YES YES YES
DATE NO NO NO NO
DATETIME NO NO NO NO
INTERVAL NO NO NO NO
CHAR YES YES YES YES
NCHAR YES YES YES YES
VARCHAR YES YES YES YES
NVARCHAR YES YES YES YES
LVARCHAR YES YES YES YES
CLOB NO NO NO NO
BLOB NO NO NO NO
ROW NO NO NO NO
SET NO NO NO NO
MULTISET NO NO NO NO
LIST NO NO NO NO
Table 5. HCL Informix datatype compatibility with , DBTYPE_DATE, DBTYPE_BOOL, DBTYPE_BYTES, and DBTYPE_BSTR.
  DBTYPE_DATE DBTYPE_BOOL DBTYPE_BYTES DBTYPE_BSTR
SMALLINT YES YES YES YES
INTEGER YES YES YES YES
INT8 YES YES YES YES
BIGINT YES YES YES YES
SERIAL YES YES YES YES
SERIAL8 YES YES YES YES
BIGSERIAL YES YES YES YES
NUMERIC YES YES YES YES
DECIMAL YES YES YES YES
FLOAT YES YES YES YES
SMALLFLOAT YES YES YES YES
MONEY YES YES YES YES
DATE YES NO YES YES
DATETIME YES NO YES YES
INTERVAL NO NO NO YES
CHAR YES YES YES YES
NCHAR YES YES YES YES
VARCHAR YES YES YES YES
NVARCHAR YES YES YES YES
LVARCHAR YES YES YES YES
CLOB NO NO NO YES
BLOB NO NO YES YES
ROW NO NO NO YES
SET NO NO NO YES
MULTISET NO NO NO YES
LIST NO NO NO YES
Table 6. HCL Informix datatype compatibility with DBTYPE_STR, DBTYPE_WSTR, DBTYPE_VARIANT, and DBTYPE_IDISPATCH.
  DBTYPE_STR DBTYPE_WSTR DBTYPE_VARIANT DBTYPE_IDISPATCH
SMALLINT YES YES YES NO
INTEGER YES YES YES NO
INT8 YES YES YES NO
BIGINT YES YES YES NO
SERIAL YES YES YES NO
SERIAL8 YES YES YES NO
BIGSERIAL YES YES YES NO
NUMERIC YES YES YES NO
DECIMAL YES YES YES NO
FLOAT YES YES YES NO
SMALLFLOAT YES YES YES NO
MONEY YES YES YES NO
DATE YES YES YES NO
DATETIME YES YES YES NO
INTERVAL YES YES NO NO
CHAR YES YES YES NO
NCHAR YES YES YES NO
VARCHAR YES YES YES NO
NVARCHAR YES YES YES NO
LVARCHAR YES YES YES NO
CLOB YES YES NO NO
BLOB YES YES NO NO
ROW YES YES YES NO
SET YES YES YES NO
MULTISET YES YES YES NO
LIST YES YES YES NO
Table 7. HCL Informix datatype compatibility with DBTYPE_IUNKNOWN, DBTYPE_GUID, DBTYPE_ERROR, and DBTYPE_BYREF.
  DBTYPE_IUNKNOWN DBTYPE_GUID DBTYPE_ERROR DBTYPE_BYREF
SMALLINT NO NO NO *
INTEGER NO NO NO *
INT8 NO NO NO *
BIGINT NO NO NO *
SERIAL NO NO NO *
SERIAL8 NO NO NO *
BIGSERIAL NO NO NO *
NUMERIC NO NO NO *
DECIMAL NO NO NO *
FLOAT NO NO NO *
SMALLFLOAT NO NO NO *
MONEY NO NO NO *
DATE NO NO NO NO
DATETIME NO NO NO NO
INTERVAL NO NO NO NO
CHAR NO YES NO *
NCHAR NO YES NO *
VARCHAR NO YES NO *
NVARCHAR NO YES NO *
LVARCHAR NO NO NO *
CLOB YES NO NO *
BLOB YES NO NO *
ROW NO NO NO *
SET NO NO NO *
MULTISET NO NO NO *
LIST NO NO NO NO
Important:
  • *All the OLE DB types that are allowed with one or more of the Informix data types for the DBTYPE_BYREF type are also allowed when combined with DBTYPE_BYREF.
  • For DBTYPE_IUNKNOWN, the supported interfaces are ISequentialStream, IStream, and ILockBytes.
Table 8. HCL Informix datatype compatibility with DBTYPE_ARRAY, DBTYPE_VECTOR, DBTYPE_UDT, and DBTYPE_DBDATE.
  DBTYPE_ARRAY DBTYPE_VECTOR DBTYPE_UDT DBTYPE_DBDATE
SMALLINT NO NO NO NO
INTEGER NO NO NO NO
INT8 NO NO NO NO
BIGINT NO NO NO NO
SERIAL NO NO NO NO
SERIAL8 NO NO NO NO
BIGSERIAL NO NO NO NO
NUMERIC NO NO NO NO
DECIMAL NO NO NO NO
FLOAT NO NO NO NO
SMALLFLOAT NO NO NO NO
MONEY NO NO NO NO
DATE NO NO NO YES
DATETIME NO NO NO YES
INTERVAL NO NO NO NO
CHAR NO NO NO YES
NCHAR NO NO NO YES
VARCHAR NO NO NO YES
NVARCHAR NO NO NO YES
LVARCHAR NO NO NO YES
CLOB NO NO NO NO
BLOB NO NO NO NO
ROW NO NO NO NO
SET NO NO NO NO
MULTISET NO NO NO NO
LIST NO NO NO NO
Table 9. HCL Informix datatype compatibility with DBTYPE_DBTIME, DBTYPE_DBTIMESTAMP, and DBTYPE_FILETIME.
  DBTYPE_DBTIME DBTYPE_DBTIMESTAMP DBTYPE_FILETIME
SMALLINT NO NO NO
INTEGER NO NO NO
INT8 NO NO NO
BIGINT NO NO NO
SERIAL NO NO NO
SERIAL8 NO NO NO
BIGSERIAL NO NO NO
NUMERIC NO NO NO
DECIMAL NO NO NO
FLOAT NO NO NO
SMALLFLOAT NO NO NO
MONEY NO NO NO
DATE YES YES YES
DATETIME YES YES YES
INTERVAL NO NO NO
CHAR YES YES YES
NCHAR YES YES YES
VARCHAR YES YES YES
NVARCHAR YES YES YES
LVARCHAR YES YES YES
CLOB NO NO NO
BLOB NO NO NO
ROW NO NO NO
SET NO NO NO
MULTISET NO NO NO
LIST NO NO NO
Table 10. HCL Informix datatype compatibility with DBTYPE_PROP_VARIANT, DBTYPE_HCHAPTER, and DBTYPE_VARNUMERIC.
  DBTYPE_PROP_VARIANT DBTYPE_HCHAPTER DBTYPE_VARNUMERIC
SMALLINT YES NO YES
INTEGER YES NO YES
INT8 YES NO YES
BIGINT YES NO YES
SERIAL YES NO YES
SERIAL8 YES NO YES
BIGSERIAL YES NO YES
NUMERIC YES NO YES
DECIMAL YES NO YES
FLOAT YES NO YES
SMALLFLOAT YES NO YES
MONEY YES NO YES
DATE NO NO NO
DATETIME NO NO NO
INTERVAL NO NO NO
CHAR YES NO YES
NCHAR YES NO YES
VARCHAR YES NO YES
NVARCHAR YES NO YES
LVARCHAR YES NO YES
CLOB NO NO NO
BLOB NO NO NO
ROW NO NO NO
SET NO NO NO
MULTISET NO NO NO
LIST NO NO NO

Copyright© 2019 HCL Technologies Limited