Informix Error -11071: Invalid string or buffer length.
Cause and resolution
Invalid string or buffer length.
This Informix CLI error code is the same as SQLSTATE value S1090. The following functions can return this error code: SQLBindCol(), SQLBindParameter(), SQLBrowseConnect(), SQLColAttributes(), SQLColumnPrivileges(), SQLColumns(), SQLConnect(), SQLDataSources(), SQLDescribeCol(), SQLDriverConnect(), SQLDrivers(), SQLExecDirect(), SQLExecute(), SQLForeignKeys(), SQLGetCursorName(), SQLGetData(), SQLGetInfo(), SQLNativeSql(), SQLPrepare(), SQLPrimaryKeys(), SQLProcedureColumns(), SQLProcedures(), SQLPutData(), SQLSetCursorName(), SQLSpecialColumns(), SQLStatistics(), SQLTablePrivileges(), and SQLTables().
The value specified for the argument cbValueMax is less than zero. Supply a value for the argument cbValueMax that is zero or greater.
For all functions, an argument that specified a string or buffer length, such as cbCursor, cbConnStrIn, or cbSqlStr, had one or more of the following problems: (1) It was less than 0, (2) It was less than 0 but not equal to SQL_NTS or SQL_NULL_DATA, (3) It was less than 0 but the corresponding pointer was not a null pointer, (4) It was equal to 1, or (5) It was too large. Set the string or buffer length to a valid value.
Additionally for SQLExecDirect() and SQLExecute(), a parameter value that was set with SQLBindParameter() had one of the following problems: (1) It was a null pointer, and the parameter length was not 0, SQL_NULL_DATA, SQL_DATA_AT_EXEC, or less than or equal to SQL_LEN_DATA_AT_EXEC_OFFSET, or (2) It was not a null pointer, and the parameter length was less than 0 but was not SQL_NTS, SQL_NULL_DATA, SQL_DATA_AT_EXEC, or less than or equal to SQL_LEN_EXEC_DATA_AT_EXEC_OFFSET. Set the parameter value to a valid value.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11071 fires when a string or buffer length argument is invalid — per the official
guidance, this is the same as SQLSTATE value S1090, returnable by a very wide range of CLI
functions (SQLBindCol(), SQLBindParameter(), SQLBrowseConnect(),
SQLColAttributes(), SQLColumnPrivileges(), SQLColumns(), SQLConnect(),
SQLDataSources(), SQLDescribeCol(), SQLDriverConnect(), SQLDrivers(),
SQLExecDirect(), SQLExecute(), SQLForeignKeys(), SQLGetCursorName(),
SQLGetData(), SQLGetInfo(), SQLNativeSql(), SQLPrepare(), SQLPrimaryKeys(),
SQLProcedureColumns(), SQLProcedures(), SQLPutData(), SQLSetCursorName(),
SQLSpecialColumns(), SQLStatistics(), SQLTablePrivileges(), and SQLTables()).
- A string or buffer-length argument outside the value the called function accepts, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the string/buffer length argument passed to the failing function against its documented valid range.
Examples
N/A
No specific triggering statement is documented beyond an invalid length argument.
Diagnostic Checks
- Review the length argument passed to the failing call, and confirm it's within the function's documented valid range.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -11071 in this set yet.
A string or buffer length argument was invalid — check it against the function's documented valid range.