Informix Error -11103: Invalid descriptor index
Cause and resolution
Invalid descriptor index
This Informix ODBC error code is the same as SQLSTATE value 07009. The following functions can return this error code: SQLBindCol, SQLBindParameter, SQLBulkOperations, SQLColAttribute, SQLDescribeCol, SQLFetch, SQLFetchScroll, SQLGetData, SQLGetDescField, SQLGetDescRec, SQLSetDescField, SQLSetDescRec, and SQLSetPos.
For SQLBindCol, SQLBindParameter, SQLColAttribute, SQLGetData, and SQLDescribeCol, the value specified for column exceeded the maximum number of columns in the result set.
For SQLBulkOperations, the argument Operation was SQL_ADD, and a column was bound with a column number greater than the number of columns in the result set.
For SQLFetch, the driver was an ODBC 2.x driver that does not support SQLExtendedFetch, and a column number specified in the binding for a column was 0.
For SQLFetchScroll, Column 0 was bound, and the SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_OFF.
For SQLSetDescField and SQLGetDescField, the RecNumber argument was equal to 0, the SQL_ATTR_USE_BOOKMARK statement attribute was SQL_UB_OFF, and the DescriptorHandle argument was an IRD handle. (This error can be returned for an explicitly allocated descriptor only if the descriptor is associated with a statement handle.) The FieldIdentifier argument was a record field, the RecNumber argument was 0, and the DescriptorHandle argument was an IPD handle. The RecNumber argument was less than 0.
For SQLSetDescRec and SQLGetDescRec, the FieldIdentifier argument was a record field, the RecNumber argument was set to 0, and the DescriptorHandle argument was an IPD handle. The RecNumber argument was set to 0, the SQL_ATTR_USE_BOOKMARKS statement attribute was set to SQL_UB_OFF, and the DescriptorHandle argument was an IRD handle.(DM) The RecNumber argument was less than 0.
For SQLSetPos, the argument Operation was SQL_REFRESH or SQL_UPDATE, and a column was bound with a column number greater than the number of columns in the result set.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11103 fires when a column or descriptor index is out of range — per the official guidance,
this is the same as SQLSTATE value 07009, returnable by SQLBindCol, SQLBindParameter,
SQLBulkOperations, SQLColAttribute, SQLDescribeCol, SQLFetch, SQLFetchScroll,
SQLGetData, SQLGetDescField, SQLGetDescRec, SQLSetDescField, SQLSetDescRec, and
SQLSetPos.
- For
SQLBindCol,SQLBindParameter,SQLColAttribute,SQLGetData, andSQLDescribeCol: the specified column exceeding the result set's maximum column count, per the official guidance — the first named case. - For
SQLBulkOperationswithOperation=SQL_ADD: a bound column number greater than the result set's column count, per the official guidance — the second named case. - For
SQLFetchon an ODBC 2.x driver that doesn't supportSQLExtendedFetch: a bound column number of0, per the official guidance — the third named case. - For
SQLFetchScroll: column0bound whileSQL_ATTR_USE_BOOKMARKSwasSQL_UB_OFF, per the official guidance — the fourth named case. - For
SQLSetDescField/SQLGetDescField/SQLSetDescRec/SQLGetDescRec:RecNumberwas0on an IRD handle with bookmarks off,0on an IPD handle for a record field, or negative, per the official guidance — the fifth named case. - For
SQLSetPoswithOperation=SQL_REFRESH/SQL_UPDATE: a bound column number greater than the result set's column count, per the official guidance — the sixth named case.
Solutions / Resolution
- Check the result set's actual column count, per the official guidance's implication, and confirm every column index used by any of the functions above falls within it.
- Confirm
RecNumberis nonzero and non-negative (or, when it must be0, that the descriptor handle/bookmark settings actually permit that), per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an out-of-range column/descriptor index.
Diagnostic Checks
- Check the result set's column count, and confirm the index argument doesn't exceed it.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -11103 in this set yet.
A column/descriptor index exceeded the result set's actual column count — check the count before indexing.