Informix Error -11127: Inconsistent descriptor information
Cause and resolution
Inconsistent descriptor information
This Informix ODBC error code is the same as SQLSTATE value HY021. The following functions can return this error code: SQLBindParameter, SQLCopyDesc, SQLGetDescField, SQLSetDescField, and SQLSetDescRec.
For SQLBindParameter, the descriptor information checked during a consistency check was not consistent. The value specified for the argument DecimalDigits was outside the range of values supported by the data source for a column of the SQL data type specified by the ParameterType argument.
For SQLCopyDesc, SQLSetDescField, and SQLSetDescRec, the descriptor information checked during a consistency check was not consistent.
For SQLGetDescField, the SQL_DESC_TYPE and SQL_DESC_DATETIME_INTERVAL_CODE fields do not form a valid ODBC SQL type, a valid driver-specific SQL type (for IPDs), or a valid ODBC C type (for APDs or ARDs).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11127 fires when a consistency check across descriptor fields fails — per the official
guidance, this is the same as SQLSTATE value HY021, returnable by SQLBindParameter,
SQLCopyDesc, SQLGetDescField, SQLSetDescField, and SQLSetDescRec.
- For
SQLBindParameter:DecimalDigitsoutside the range the data source supports for the SQL typeParameterTypespecifies, per the official guidance — the first named case. - For
SQLCopyDesc,SQLSetDescField, andSQLSetDescRec: a descriptor-field consistency check failed, per the official guidance — no further named detail; the second named case. - For
SQLGetDescField: theSQL_DESC_TYPEandSQL_DESC_DATETIME_INTERVAL_CODEfields don't together form a valid ODBC SQL type, driver-specific SQL type (for IPDs), or ODBC C type (for APDs/ARDs), per the official guidance — the third named case.
Solutions / Resolution
- For
SQLBindParameter: check the Informix CLI Programmer's Manual for the validDecimalDigitsrange for the bound parameter's SQL type, per the official guidance's implication. - For
SQLCopyDesc/SQLSetDescField/SQLSetDescRec: review all fields being set on the descriptor together for mutual consistency, per the official guidance's implication. - For
SQLGetDescField: confirmSQL_DESC_TYPEandSQL_DESC_DATETIME_INTERVAL_CODEtogether name a valid type for the descriptor's role (IPD, APD, or ARD), per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an inconsistent descriptor field combination.
Diagnostic Checks
- Check the
DecimalDigitsvalue against the valid range for the boundParameterType, and correct any mismatch.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -11127 in this set yet.
A descriptor field combination was inconsistent, e.g. DecimalDigits out of range for its
ParameterType — check the CLI manual for the valid range.