Informix Error -9970: Cannot determine host variable type during bind.
Cause and resolution
Cannot determine host variable type during bind.
An ambiguous bind message was received. The database server could not infer the variable type from the context of the query. The host variable type must be explicitly defined.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9970 fires when the server receives an ambiguous bind message and can't infer a host variable's type from the query's context — per the official guidance.
- A host variable whose type can't be inferred from the query context, per the official guidance — the direct, only cause.
Solutions / Resolution
- Explicitly define the host variable's type, per the official guidance.
Examples
An ambiguous parameter binding
SELECT * FROM tab WHERE some_expr(col) = ?; -- -9970 if the ? type can't be inferred
Corrected — casting the parameter
SELECT * FROM tab WHERE some_expr(col) = CAST(? AS INTEGER);
Diagnostic Checks
- Check the query for a parameter marker whose type the context doesn't determine, and add an explicit CAST.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -9970 in this set yet.
A host variable's type couldn't be inferred during bind — cast the parameter to an explicit type.