Informix Error -11029: String data, length mismatch.
Cause and resolution
String data, length mismatch.
This Informix CLI error code is the same as SQLSTATE value 22026. The following function can return this error code: SQLParamData().
Before you called SQLParamData(), SQLGetInfo() returned "Y" when you called it with an information type of SQL_NEED_LONG_DATA_LEN. You then sent less data than the amount that the pcbValue argument specified in SQLBindParameter(). Send the amount of data that pcbValue specifies.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11029 fires when SQLParamData() is sent less data than the bound parameter's length
specifies — per the official guidance, this is the same as SQLSTATE value 22026.
- Less data sent to
SQLParamData()than thepcbValueargument specified inSQLBindParameter(), per the official guidance — occurring afterSQLGetInfo()withSQL_NEED_LONG_DATA_LENreturned "Y" — the direct, only cause.
Solutions / Resolution
- Send the exact amount of data that
pcbValuespecifies, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond under-length data sent to
SQLParamData().
Diagnostic Checks
- Check the
pcbValuelength bound viaSQLBindParameter(), and confirm the data sent toSQLParamData()matches it exactly.
Related Errors / Related Topics
- -11023 — "String data right truncation." The mirror-image error — too much data sent
to
SQLPutData()rather than too little sent toSQLParamData().
Less data was sent to SQLParamData() than the bound parameter's length requires — send
exactly the pcbValue-specified amount.