Informix Error -474
-474 Unknown field type.
An unknown field type has been requested. Check that you are using one of the valid field types in X/Open mode, and try again. The valid field types are TYPE, LENGTH, PRECISION, SCALE, NULLABLE, INDICATOR, DATA, and NAME.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-474 fires when a GET DESCRIPTOR/SET DESCRIPTOR statement in X/Open mode requests a field
type that isn't one of the recognized ones. The valid field types in this mode are TYPE,
LENGTH, PRECISION, SCALE, NULLABLE, INDICATOR, DATA, and NAME — anything else is
rejected.
- A misspelled field type keyword in the
GET DESCRIPTOR/SET DESCRIPTORstatement. - A field type valid in a different context (native Informix mode, or a different API) mistakenly used here.
- Assuming a broader or different set of field types is available than X/Open mode actually supports.
Solutions / Resolution
- Use only the valid X/Open field types, per the official guidance:
TYPE,LENGTH,PRECISION,SCALE,NULLABLE,INDICATOR,DATA, orNAME. - Double-check spelling against this exact list.
- Consult the X/Open descriptor field-type reference for the server version in use if uncertain which field type actually corresponds to the desired information.
Examples
Using a valid field type
GET DESCRIPTOR 'desc1' VALUE 1 :col_type = TYPE;
The disallowed unknown field type
GET DESCRIPTOR 'desc1' VALUE 1 :col_type = DATATYPE;
-- -474: DATATYPE isn't a valid field type; the correct
-- keyword is TYPE
Diagnostic Checks
- Check the field type keyword against the exact valid list:
TYPE,LENGTH,PRECISION,SCALE,NULLABLE,INDICATOR,DATA,NAME.
Related Errors / Related Topics
- -473 — "The specified data type is not a X/Open standard type." A related X/Open-mode descriptor restriction, about data type codes rather than field type keywords.
- -469 — "This descriptor does not exist." A related descriptor-usage error, about a missing allocation rather than an invalid field type keyword.
Only eight field type keywords are valid in X/Open mode — check spelling against the exact list rather than assuming a broader or different set is available.