Informix Error -1116
-1116 Default value from form field cannot be converted to
input variable type.This statement takes input from a form field whose default value (which the ATTRIBUTES keyword DEFAULT specifies in the form) is not compatible with the program variable that receives it. Review all the program variables that are named in this statement, and compare them to the definitions of the fields in the form specification. Check that each variable corresponds to the intended field and has a compatible data type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1116 fires when a form field's DEFAULT attribute value can't be converted to the type of the
program variable receiving it — per the official guidance, this is a type-compatibility problem
between the ATTRIBUTES section's DEFAULT value and the input variable.
- A
DEFAULTvalue whose type doesn't match the receiving program variable's type, per the official guidance — the direct, only cause. - A form field's
DEFAULTvalue changed without checking it against every program variable that receives it.
Solutions / Resolution
- Review all program variables referenced in the statement, per the official guidance, and verify each corresponds to the correct form field with a compatible data type.
- Correct either the
DEFAULTvalue's type in the form specification, or the program variable's declared type, whichever is actually wrong.
Examples
A DEFAULT value that doesn't convert
ATTRIBUTES
status = order_status,
DEFAULT = "pending";
-- program variable:
DEFINE v_status INTEGER;
-- -1116: "pending" cannot convert to INTEGER
Diagnostic Checks
- Compare the form field's
DEFAULTvalue type against the receiving program variable's declared type.
Related Errors / Related Topics
- -1106 — "Error in field." A related type-mismatch error, about a user-entered value not
fitting the receiving variable, rather than a form field's own
DEFAULTvalue.
The form field's DEFAULT value type doesn't match the receiving program variable — correct
whichever side is wrong.