Informix Error -22559: SQLUNKNOWN is invalid data type, need to be set valid data type.
Cause and resolution
SQLUNKNOWN is invalid data type, need to be set valid data type.
If the database server cannot infer the type of parameter in an expression, the DESCRIBE INPUT statement returns SQLUNKNOWN as the data type. Before statement execution, you must set a valid SQL data type to replace SQLUNKNOWN.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-22559 fires when a DESCRIBE INPUT result's SQLUNKNOWN placeholder type is used
without being resolved — per the official guidance, the database server returns
SQLUNKNOWN when it can't infer a parameter's type, and the caller must set a valid SQL
data type in its place before executing the statement.
- An
SQLUNKNOWNtype fromDESCRIBE INPUTleft unresolved before statement execution, per the official guidance — the direct, only cause.
Solutions / Resolution
- Set a valid SQL data type in place of
SQLUNKNOWNbefore executing the statement, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond executing with an unresolved
SQLUNKNOWN.
Diagnostic Checks
- Check the
DESCRIBE INPUToutput for any parameter still typedSQLUNKNOWN, and set a valid type before execution.
Related Errors / Related Topics
- -22554 — "Field type field-type-name has been used out of context." A related
system-descriptor error, on a field type used in the wrong context rather than an
unresolved
SQLUNKNOWNtype.
A DESCRIBE INPUT parameter's SQLUNKNOWN type was left unresolved before execution —
set a valid SQL data type first.