Informix Error -11086: Fetch type out of range.
Cause and resolution
Fetch type out of range.
This Informix CLI error code is the same as SQLSTATE value S1106. The following function can return this error code: SQLExtendedFetch().
The value specified for the argument fFetchType is invalid. For a list of valid values for the fFetchType parameter, check the Informix CLI Programmer's Manual.
One of the following problems occurred: (1) The fFetchType argument was not a valid fetch type, or (2) SQL_CURSOR_TYPE was SQL_CURSOR_FORWARD_ONLY but fFetchType was not SQL_FETCH_NEXT. Set fFetchType to a valid value that corresponds to the cursor type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11086 fires when SQLExtendedFetch()'s fFetchType argument is invalid — per the official
guidance, this is the same as SQLSTATE value S1106.
fFetchTypenot a valid fetch type, per the official guidance — the first named case.SQL_CURSOR_TYPEwasSQL_CURSOR_FORWARD_ONLYbutfFetchTypewasn'tSQL_FETCH_NEXT, per the official guidance — the second named case; a forward-only cursor can only fetch forward.
Solutions / Resolution
- Set
fFetchTypeto a value valid for the cursor'sSQL_CURSOR_TYPE, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an invalid/incompatible fFetchType
value.
Diagnostic Checks
- Check the cursor's
SQL_CURSOR_TYPE, and confirmfFetchTypeis compatible with it (forward-only cursors accept onlySQL_FETCH_NEXT).
Related Errors / Related Topics
- -11087 — "Row value out of range." A related
SQLExtendedFetch()argument-validity error, on the keyset/rowset size relationship rather than the fetch type.
SQLExtendedFetch()'s fFetchType was invalid or incompatible with the cursor's type — set
it to a compatible value.