Informix Error -1115: Numeric value too long for field.
Cause and resolution
Numeric value too long for field.
4GL tried to format a numeric value for display in a form field, but the resulting string was too long for the field. Review the program logic to find out what large numeric value is being assigned.
For 4GL programs that were compiled at Version 5.0 and later or that are running under 4GL/GX, this error cannot occur.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1115 fires when 4GL tries to display a numeric value in a form field but the value's formatted string is wider than the field's capacity — per the official guidance, this error doesn't apply to programs compiled at Version 5.0 or later, or to programs running under 4GL/GX.
- A numeric value whose formatted width exceeds the field's defined display width, per the official guidance — the direct, only cause, on the older program versions this error still applies to.
- A field width that was sized for a smaller expected range of values than the data actually contains.
Solutions / Resolution
- Review the program logic to identify the oversized numeric value, per the official guidance.
- Widen the field's defined display width in the form specification, or format/scale the value down, whichever matches the actual intended design.
- Note that this error doesn't apply to programs compiled at Version 5.0+ or under 4GL/GX, per the official guidance — if seen on a newer program, treat it as unexpected and investigate further.
Examples
A value wider than the field
ATTRIBUTES
total = order_total,
PICTURE = "###.##";
-- assigning order_total = 12345.67 produces a formatted width
-- wider than the 3-digit-integer-part PICTURE allows
Diagnostic Checks
- Check the numeric value's formatted width against the field's defined display width in the form specification.
- Confirm the program's compiled version, since this error is specific to pre-5.0, non-4GL/GX programs.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1115 in this set yet.
A numeric value's formatted width exceeds the field's display capacity — widen the field or scale the value, on the older program versions this error still applies to.