Informix Error -2895
-2895 Display field length of field-size does not match
the database column length of column-size. This is a warning only.The size of the character field that is defined in this statement (as shown by its appearance in the SCREEN section) is different from the size of the associate column. You specified the -v option to the form compiler to request warnings of this type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2895 is a compiler warning, not a hard error — per the official guidance, the character
field's size (as shown in SCREEN) differs from the size of its associated database column,
and it only appears because the -v option was passed to the form compiler to request
warnings of this type.
- A display field's declared size differs from its associated column's actual size, per the official guidance — the direct cause.
- Only surfaced because the form compiler was invoked with
-v, per the official guidance — this is a warning, not a hard error.
Solutions / Resolution
- Decide whether the mismatch is intentional (e.g. deliberately showing a truncated view of a longer column) or accidental, per the official guidance.
- If accidental, adjust the display field's width in
SCREENto match the column's actual size, per the official guidance. - Omit
-vwhen compiling if these warnings aren't of interest.
Examples
Compiling with warnings enabled
form4gl -v myform.per
Adjusting field width to match the column
SCREEN
{
Description: [descr ]
}
END
Diagnostic Checks
- Check the declared width of the display field in
SCREENagainst the column's actual size (e.g. viasyscolumns), and decide whether the mismatch is intentional.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -2895 in this set yet.
A display field's width doesn't match its column's size — this is a -v-only compiler
warning, not a hard error; adjust the width if the mismatch wasn't intended.