Informix Error -11422: Smart large objects can only be used by setting SQL_INFX_ATTR_LO_AUTOMATIC.
Cause and resolution
Smart large objects can only be used by setting SQL_INFX_ATTR_LO_AUTOMATIC.
The SQL_INFX_ATTR_LO_AUTOMATIC connection or statement level attribute must be set when working with smart large objects. You can set the SQL_INFX_ATTR_LO_AUTOMATIC attribute by setting the SQLSetConnectAttr or SQLSetStmtAttr functions or by turning on the Report Standard ODBC Types option under the Advanced tab of the ODBC Administration for Informix Driver DSN.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11422 fires when smart large objects are used without the required connection/statement attribute set — per the official guidance.
SQL_INFX_ATTR_LO_AUTOMATICnot set at the connection or statement level, per the official guidance — the direct, only cause.
Solutions / Resolution
- Set
SQL_INFX_ATTR_LO_AUTOMATICviaSQLSetConnectAttr/SQLSetStmtAttr, per the official guidance, or - Turn on the "Report Standard ODBC Types" option under the Advanced tab of the ODBC Administration for the Informix Driver DSN, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond using smart large objects without the attribute set.
Diagnostic Checks
- Check whether
SQL_INFX_ATTR_LO_AUTOMATICis set at the connection or statement level before working with smart large objects.
Related Errors / Related Topics
- -11415 — "Cannot set LO Automatic option OFF when Standard ODBC Types only is ON." A related ordering restriction on the same attribute.
- -11416 — "Cannot set Standard ODBC Types only to ON when LO Automatic option is OFF." A related ordering restriction on the same attribute.
Smart large objects require SQL_INFX_ATTR_LO_AUTOMATIC to be set — set it via
SQLSetConnectAttr/SQLSetStmtAttr or the driver's ODBC Administration Advanced tab.