Data conversions from OLE DB types to HCL Informix® types

Truncation of data might occur in some cases.

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.

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 1. OLE DB datatype compatibility with SMALLINT, INTEGER, INT8, and BIGINT.
SMALLINT INTEGER INT8 BIGINT
DBTYPE_EMPTY NO NO NO NO
DBTYPE_NULL NO NO NO NO
DBTYPE_RESERVED NO NO NO NO
DBTYPE_I1 YES YES YES YES
DBTYPE_I2 YES YES YES YES
DBTYPE_I4 YES YES YES YES
DBTYPE_I8 NO NO NO NO
DBTYPE_UI1 YES YES YES YES
DBTYPE_UI2 YES YES YES YES
DBTYPE_UI4 YES YES YES YES
DBTYPE_UI8 NO NO NO NO
DBTYPE_R4 YES YES YES YES
DBTYPE_R8 YES YES YES YES
DBTYPE_CY YES YES YES YES
DBTYPE_DECIMAL YES YES YES YES
DBTYPE_NUMERIC YES YES YES YES
DBTYPE_DATE YES YES YES YES
DBTYPE_BOOL YES YES YES YES
DBTYPE_BYTES YES YES YES YES
DBTYPE_BSTR YES YES YES YES
DBTYPE_STR YES YES YES YES
DBTYPE_WSTR YES YES YES YES
DBTYPE_VARIANT YES YES YES YES
DBTYPE_IDISPATCH NO NO NO NO
DBTYPE_IUNKNOWN NO NO NO NO
DBTYPE_GUID NO NO NO NO
DBTYPE_ERROR NO NO NO NO
DBTYPE_BYREF * * * *
DBTYPE_ARRAY NO NO NO NO
DBTYPE_VECTOR NO NO NO NO
DBTYPE_UDT NO NO NO NO
DBTYPE_DBDATE NO NO NO NO
DBTYPE_DBTIME NO NO NO NO
DBTYPE_DBTIMESTAMP NO NO NO NO
DBTYPE_FILETIME NO NO NO NO
DBTYPE_PROP_VARIANT YES YES YES YES
DBTYPE_HCHAPTER NO NO NO NO
DBTYPE_VARNUMERIC YES YES YES YES
Table 2. OLE DB datatype compatibility with SERIAL, SERIAL8, and BIGSERIAL.
SERIAL SERIAL8 BIGSERIAL
DBTYPE_EMPTY NO NO NO
DBTYPE_NULL NO NO NO
DBTYPE_RESERVED NO NO NO
DBTYPE_I1 YES YES YES
DBTYPE_I2 YES YES YES
DBTYPE_I4 YES YES YES
DBTYPE_I8 NO NO NO
DBTYPE_UI1 YES YES YES
DBTYPE_UI2 YES YES YES
DBTYPE_UI4 YES YES YES
DBTYPE_UI8 NO NO NO
DBTYPE_R4 YES YES YES
DBTYPE_R8 YES YES YES
DBTYPE_CY YES YES YES
DBTYPE_DECIMAL YES YES YES
DBTYPE_NUMERIC YES YES YES
DBTYPE_DATE YES YES YES
DBTYPE_BOOL YES YES YES
DBTYPE_BYTES YES YES YES
DBTYPE_BSTR YES YES YES
DBTYPE_STR YES YES YES
DBTYPE_WSTR YES YES YES
DBTYPE_VARIANT YES YES YES
DBTYPE_IDISPATCH NO NO NO
DBTYPE_IUNKNOWN NO NO NO
DBTYPE_GUID NO NO NO
DBTYPE_ERROR NO NO NO
DBTYPE_BYREF * * *
DBTYPE_ARRAY NO NO NO
DBTYPE_VECTOR NO NO NO
DBTYPE_UDT NO NO NO
DBTYPE_DBDATE NO NO NO
DBTYPE_DBTIME NO NO NO
DBTYPE_DBTIMESTAMP NO NO NO
DBTYPE_FILETIME NO NO NO
DBTYPE_PROP_VARIANT YES YES YES
DBTYPE_HCHAPTER NO NO NO
DBTYPE_VARNUMERIC YES YES YES
Table 3. OLE DB datatype compatibility with NUMERIC, DECIMAL, FLOAT, and SMALLFLOAT.
NUMERIC DECIMAL FLOAT SMALLFLOAT
DBTYPE_EMPTY NO NO NO NO
DBTYPE_NULL NO NO NO NO
DBTYPE_RESERVED NO NO NO NO
DBTYPE_I1 YES YES YES YES
DBTYPE_I2 YES YES YES YES
DBTYPE_I4 YES YES YES YES
DBTYPE_I8 NO NO NO NO
DBTYPE_UI1 YES YES YES YES
DBTYPE_UI2 YES YES YES YES
DBTYPE_UI4 YES YES YES YES
DBTYPE_UI8 NO NO NO NO
DBTYPE_R4 YES YES YES YES
DBTYPE_R8 YES YES YES YES
DBTYPE_CY YES YES YES YES
DBTYPE_DECIMAL YES YES YES YES
DBTYPE_NUMERIC YES YES YES YES
DBTYPE_DATE YES YES YES YES
DBTYPE_BOOL YES YES YES YES
DBTYPE_BYTES YES YES YES YES
DBTYPE_BSTR YES YES YES YES
DBTYPE_STR YES YES YES YES
DBTYPE_WSTR YES YES YES YES
DBTYPE_VARIANT YES YES YES YES
DBTYPE_IDISPATCH NO NO NO NO
DBTYPE_IUNKNOWN NO NO NO NO
DBTYPE_GUID NO NO NO NO
DBTYPE_ERROR NO NO NO NO
DBTYPE_BYREF * * * *
DBTYPE_ARRAY NO NO NO NO
DBTYPE_VECTOR NO NO NO NO
DBTYPE_UDT NO NO NO NO
DBTYPE_DBDATE NO NO NO NO
DBTYPE_DBTIME NO NO NO NO
DBTYPE_DBTIMESTAMP NO NO NO NO
DBTYPE_FILETIME NO NO NO NO
DBTYPE_PROP_VARIANT YES YES YES YES
DBTYPE_HCHAPTER NO NO NO NO
DBTYPE_VARNUMERIC YES YES YES YES
Table 4. OLE DB datatype compatibility with CHAR, NCHAR, VARCHAR, NVARCHAR, and LVARCHAR.
CHAR NCHAR VARCHAR NVARCHAR LVARCHAR
DBTYPE_EMPTY NO NO NO NO NO
DBTYPE_NULL NO NO NO NO NO
DBTYPE_RESERVED NO NO NO NO NO
DBTYPE_I1 YES YES YES YES YES
DBTYPE_I2 YES YES YES YES YES
DBTYPE_I4 YES YES YES YES YES
DBTYPE_I8 YES YES YES YES NO
DBTYPE_UI1 YES YES YES YES YES
DBTYPE_UI2 YES YES YES YES YES
DBTYPE_UI4 YES YES YES YES YES
DBTYPE_UI8 YES YES YES YES NO
DBTYPE_R4 YES YES YES YES YES
DBTYPE_R8 YES YES YES YES YES
DBTYPE_CY YES YES YES YES YES
DBTYPE_DECIMAL YES YES YES YES YES
DBTYPE_NUMERIC YES YES YES YES YES
DBTYPE_DATE YES YES YES YES YES
DBTYPE_BOOL YES YES YES YES YES
DBTYPE_BYTES YES YES YES YES YES
DBTYPE_BSTR YES YES YES YES YES
DBTYPE_STR YES YES YES YES YES
DBTYPE_WSTR YES YES YES YES YES
DBTYPE_VARIANT YES YES YES YES YES
DBTYPE_IDISPATCH NO NO NO NO NO
DBTYPE_IUNKNOWN NO NO NO NO NO
DBTYPE_GUID YES YES YES YES NO
DBTYPE_ERROR NO NO NO NO NO
DBTYPE_BYREF * * * * *
DBTYPE_ARRAY NO NO NO NO NO
DBTYPE_VECTOR NO NO NO NO NO
DBTYPE_UDT NO NO NO NO NO
DBTYPE_DBDATE YES YES YES YES YES
DBTYPE_DBTIME YES YES YES YES YES
DBTYPE_DBTIMESTAMP YES YES YES YES YES
DBTYPE_FILETIME YES YES YES YES YES
DBTYPE_PROP_VARIANT YES YES YES YES YES
DBTYPE_HCHAPTER NO NO NO NO NO
DBTYPE_VARNUMERIC YES YES YES YES YES
Table 5. OLE DB datatype compatibility with MONEY, DATE, DATETIME, and INTERVAL.
MONEY DATE DATETIME INTERVAL
DBTYPE_EMPTY NO NO NO NO
DBTYPE_NULL NO NO NO NO
DBTYPE_RESERVED NO NO NO NO
DBTYPE_I1 YES NO NO YES
DBTYPE_I2 YES NO NO YES
DBTYPE_I4 YES NO NO YES
DBTYPE_I8 NO NO NO YES
DBTYPE_UI1 YES NO NO YES
DBTYPE_UI2 YES NO NO YES
DBTYPE_UI4 YES NO NO YES
DBTYPE_UI8 NO NO NO YES
DBTYPE_R4 YES NO NO NO
DBTYPE_R8 YES NO NO NO
DBTYPE_CY YES NO NO NO
DBTYPE_DECIMAL YES NO NO NO
DBTYPE_NUMERIC YES NO NO NO
DBTYPE_DATE YES YES YES NO
DBTYPE_BOOL YES NO NO NO
DBTYPE_BYTES YES YES YES NO
DBTYPE_BSTR YES YES YES YES
DBTYPE_STR YES YES YES YES
DBTYPE_WSTR YES YES YES YES
DBTYPE_VARIANT YES YES YES NO
DBTYPE_IDISPATCH NO NO NO NO
DBTYPE_IUNKNOWN NO NO NO NO
DBTYPE_GUID NO NO NO NO
DBTYPE_ERROR NO NO NO NO
DBTYPE_BYREF * NO NO NO
DBTYPE_ARRAY NO NO NO NO
DBTYPE_VECTOR NO NO NO NO
DBTYPE_UDT NO NO NO NO
DBTYPE_DBDATE NO YES YES NO
DBTYPE_DBTIME NO YES YES NO
DBTYPE_DBTIMESTAMP NO YES YES NO
DBTYPE_FILETIME NO YES YES NO
DBTYPE_PROP_VARIANT YES NO NO NO
DBTYPE_HCHAPTER NO NO NO NO
DBTYPE_VARNUMERIC YES NO NO NO
Table 6. OLE DB datatype compatibility with CLOB, BLOB, and ROW.
CLOB BLOB ROW
DBTYPE_EMPTY NO NO NO
DBTYPE_NULL NO NO NO
DBTYPE_RESERVED NO NO NO
DBTYPE_I1 NO NO NO
DBTYPE_I2 NO NO NO
DBTYPE_I4 NO NO NO
DBTYPE_I8 NO NO NO
DBTYPE_UI1 NO NO NO
DBTYPE_UI2 NO NO NO
DBTYPE_UI4 NO NO NO
DBTYPE_UI8 NO NO NO
DBTYPE_R4 NO NO NO
DBTYPE_R8 NO NO NO
DBTYPE_CY NO NO NO
DBTYPE_DECIMAL NO NO NO
DBTYPE_NUMERIC NO NO NO
DBTYPE_DATE NO NO NO
DBTYPE_BOOL NO NO NO
DBTYPE_BYTES NO YES NO
DBTYPE_BSTR YES YES YES
DBTYPE_STR YES YES YES
DBTYPE_WSTR YES YES YES
DBTYPE_VARIANT NO NO YES
DBTYPE_IDISPATCH NO NO NO
DBTYPE_IUNKNOWN YES YES NO
DBTYPE_GUID NO NO NO
DBTYPE_ERROR NO NO NO
DBTYPE_BYREF * * *
DBTYPE_ARRAY NO NO NO
DBTYPE_VECTOR NO NO NO
DBTYPE_UDT NO NO NO
DBTYPE_DBDATE NO NO NO
DBTYPE_DBTIME NO NO NO
DBTYPE_DBTIMESTAMP NO NO NO
DBTYPE_FILETIME NO NO NO
DBTYPE_PROP_VARIANT NO NO NO
DBTYPE_HCHAPTER NO NO NO
DBTYPE_VARNUMERIC NO NO NO
Table 7. OLE DB datatype compatibility with SET, MULTISET, and LIST.
SET MULTISET LIST
DBTYPE_EMPTY NO NO NO
DBTYPE_NULL NO NO NO
DBTYPE_RESERVED NO NO NO
DBTYPE_I1 NO NO NO
DBTYPE_I2 NO NO NO
DBTYPE_I4 NO NO NO
DBTYPE_I8 NO NO NO
DBTYPE_UI1 NO NO NO
DBTYPE_UI2 NO NO NO
DBTYPE_UI4 NO NO NO
DBTYPE_UI8 NO NO NO
DBTYPE_R4 NO NO NO
DBTYPE_R8 NO NO NO
DBTYPE_CY NO NO NO
DBTYPE_DECIMAL NO NO NO
DBTYPE_NUMERIC NO NO NO
DBTYPE_DATE NO NO NO
DBTYPE_BOOL NO NO NO
DBTYPE_BYTES NO NO NO
DBTYPE_BSTR YES YES YES
DBTYPE_STR YES YES YES
DBTYPE_WSTR YES YES YES
DBTYPE_VARIANT YES YES YES
DBTYPE_IDISPATCH NO NO NO
DBTYPE_IUNKNOWN NO NO NO
DBTYPE_GUID NO NO NO
DBTYPE_ERROR NO NO NO
DBTYPE_BYREF * * NO
DBTYPE_ARRAY NO NO NO
DBTYPE_VECTOR NO NO NO
DBTYPE_UDT NO NO NO
DBTYPE_DBDATE NO NO NO
DBTYPE_DBTIME NO NO NO
DBTYPE_DBTIMESTAMP NO NO NO
DBTYPE_FILETIME NO NO NO
DBTYPE_PROP_VARIANT NO NO NO
DBTYPE_HCHAPTER NO NO NO
DBTYPE_VARNUMERIC 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.

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.