Informix Error -4104: The type of a column value does not match the type of a variable.
Cause and resolution
The type of a column value does not match the type of a variable.
The INITIALIZE statement cannot establish a match between the type of the column value and the type of the corresponding variable.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4104 fires when an INITIALIZE statement can't match a column's type to the corresponding
variable's type — per the official guidance, this is a direct type mismatch between the
column and the variable being initialized from it.
- A column value's type incompatible with the receiving variable's declared type, per the official guidance — the direct, only cause.
Solutions / Resolution
- Review the
INITIALIZEstatement's column-to-variable mapping, and either change the variable's declared type or the columns referenced so the types agree.
Examples
A type mismatch in INITIALIZE
DEFINE qty CHAR(10)
INITIALIZE qty TO order_qty
-- -4104: order_qty is INTEGER, qty is CHAR
Corrected
DEFINE qty INTEGER
INITIALIZE qty TO order_qty
Diagnostic Checks
- Check the declared type of every variable initialized via
INITIALIZEagainst the actual type of the column it's mapped to.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4104 in this set yet.
An INITIALIZE statement's column and variable types don't match — align the variable's type
with the column's.