Informix Error -11024: Indicator variable required but not supplied.
Cause and resolution
Indicator variable required but not supplied.
This Informix CLI error code is the same as SQLSTATE value 22002. The following functions can return this error code: SQLExtendedFetch(), SQLFetch(), and SQLGetData().
For SQLExtendedFetch() or SQLFetch(), the value for a bound column was null but the INDICATOR_PTR field in the corresponding record was a null pointer. For each column that can have a null value, set the corresponding pointer to a non-null value.
For SQLGetData(), the column value was null but StrLen_or_Ind was a null pointer. For each column that can have a null value, set the corresponding StrLen_or_Ind value to a non-null value.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11024 fires when a fetched column value is null but no indicator pointer was bound to receive that — per the official guidance, this is the same as SQLSTATE value 22002.
- For
SQLExtendedFetch()/SQLFetch(): a bound column's value was null, but itsINDICATOR_PTRfield was a null pointer, per the official guidance — the first named case. - For
SQLGetData(): the retrieved column value was null, butStrLen_or_Indwas a null pointer, per the official guidance — the second named case.
Solutions / Resolution
- For
SQLExtendedFetch()/SQLFetch(): setINDICATOR_PTRto a non-null value for every column that can be null, per the official guidance. - For
SQLGetData(): setStrLen_or_Indto a non-null value for every column that can be null, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a missing indicator pointer for a nullable column.
Diagnostic Checks
- Check every
SQLBindCol()call for columns that can be null, and confirm each has a non-nullINDICATOR_PTR.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -11024 in this set yet.
A fetched column was null but had no indicator pointer bound — set a non-null indicator pointer for every nullable column.