The mi_bitvarying data type

The SQL BITVARYING data type stores variable-length byte data that is potentially larger than 255 bytes. The BITVARYING data type is a predefined opaque type (an opaque data type that HCL Informix® defines). The DataBlade® API supports the BITVARYING data type with the mi_bitvarying data type, which the DataBlade API implements as a varying-length structure.
Tip: The SQL data type BITVARYING and the DataBlade API data type mi_bitvarying are not exactly the same. Although you use the mi_bitvarying varying-length structure to hold BITVARYING data, you can also use a varying-length structure for other varying-length data.
For a BITVARYING column, the maximum size of the data is two kilobytes. This limitation is not inherent to the BITVARYING data type; however, the maximum row size in a database table is 32 KB. If a BITVARYING column were to use the full supported size of 32 KB, the table can contain only one column: a single BITVARYING column.
Tip: If you need to store more than 2 KB of byte data, use the BLOB data type. The BLOB data type enables you to store the byte data outside the database table in an sbspace. For more information, see Smart large objects.

You can use an mi_bitvarying varying-length structure to store large amounts of byte data. For more information, see Varying-length data type structures.

The routine manager uses an mi_bitvarying structure to hold data for an argument or return value of a C UDR when this data is a varying-length opaque type. For more information, see Determine the passing mechanism for an opaque type.

Server only:
You must use the mi_bitvarying data type if your UDR expects any varying-length data type as an argument or a return value. Within an MI_DATUM structure, the routine manager passes varying-length opaque-type data to and from a C UDR as a pointer to an mi_bitvarying varying-length structure. Therefore, a C UDR must handle this data as mi_bitvarying values when it receives arguments or returns data of a varying-length opaque data type, as the following table describes.
Handling character data More information
If the C UDR receives an argument of a varying-length opaque data type, it must declare its corresponding parameter as a pointer to an mi_bitvarying data type. Handling varying-length opaque-type arguments
If a C UDR returns a value of a varying-length opaque data type, it must return a pointer to an mi_bitvarying data type. Return opaque-type values