The SQL_BIGINT data type
HCL Informix® supports the INT8 Informix® SQL data type.
By default, the driver maps INT8 to the SQL_BIGINT Informix® ODBC Driver SQL data type and to the SQL_C_CHAR default Informix® ODBC Driver C data type. However, client functions cannot access all the data type conversion functions. Therefore, you must use a data type other than SQL_C_CHAR when you use a value of type SQL_BIGINT.
For example, before you call ifx_lo_specset_estbytes(),
you need to bind a variable for the estbytes input argument.
Because estbytes is an SQL_BIGINT, you would normally bind estbytes to
an SQL_C_CHAR. However, SQL_C_CHAR does not work for
SQL_BIGINT for a client function. The following code example illustrates
how to bind estbytes to an SQL_C_LONG instead of an SQL_C_CHAR for ifx_lo_specset_estbytes():
rc = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_LONG,
SQL_BIGINT, (UDWORD)0, 0, &estbytes, sizeof(estbytes), NULL);
rc = SQLExecDirect(hstmt, "{call ifx_lo_specset_estbytes(?, ?)}", SQL_NTS);