Informix Error -2021
-2021 An illegal color has been specified. Colors 0 through 7 are white,
yellow, magenta, red, cyan, green, blue, and black.Both in a COLOR attribute in a form specification and in a display attribute in a 4GL program, you must specify colors by name and spell them as this message shows. Check the spelling and punctuation of the statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-2021 fires when a COLOR attribute in a form specification (or a display attribute in a 4GL
program) names something other than one of the eight predefined colors — per the official
guidance, colors 0 through 7 are white, yellow, magenta, red, cyan, green, blue, and black, and
must be specified by their exact names.
- A misspelled or invalid color name, per the official guidance — the direct, only cause.
Solutions / Resolution
- Verify the spelling and punctuation of the color name, per the official guidance, against the eight valid names: white, yellow, magenta, red, cyan, green, blue, black.
Examples
A misspelled color name
ATTRIBUTES
status = order_status, COLOR = "grey";
-- -2021: "grey" is not one of the eight valid color names
Corrected
ATTRIBUTES
status = order_status, COLOR = "red";
Diagnostic Checks
- Check the exact spelling of every
COLORvalue against the eight valid names.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -2021 in this set yet.
An invalid color name was specified — use one of the eight valid names (white, yellow, magenta, red, cyan, green, blue, black).