Informix Error -4504
-4504 A validation error has occurred as a result of the VALIDATE command.
The type of a VALIDATE variable cannot be converted to the type of the validation values. Only NewEra returns this error.
-4504 A validation error has occurred as a result of the VALIDATE command.
See error -1321, which has replaced this error for products other than NewEra.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4504 covers two variants, per the official guidance. On NewEra, this code stays active with
its own meaning: the type of a VALIDATE variable cannot be converted to the type of the
validation values. On products other than NewEra, this code is a legacy wording that has been
replaced by error -1321.
- On NewEra: a
VALIDATEvariable's type is incompatible with the validation values' type, per the official guidance — the direct, active cause on that product. - On other products: this exact wording is superseded, per the official guidance — -1321 now covers the same underlying condition there.
Solutions / Resolution
- On NewEra, make the
VALIDATEvariable's type compatible with the type of the validation values, per the official guidance. - On other products, treat this as -1321 and apply that code's resolution steps.
Examples
A type-incompatible VALIDATE variable (NewEra)
DEFINE status CHAR(1)
VALIDATE status EQUALS "A", "I"
-- -4504: if the validation values' underlying type can't convert to CHAR(1)
Diagnostic Checks
- On NewEra, check the
VALIDATEvariable's declared type against the validation values', and make them compatible. - On other products, confirm whether -1321 is the code actually reported, and refer to that code's diagnostics.
Related Errors / Related Topics
- -1321 — "A validation error has occurred as a result of the VALIDATE command." The current, active code that has replaced -4504 for products other than NewEra.
A VALIDATE variable's type is incompatible with its validation values (NewEra), or this
legacy wording has been replaced by -1321 on other products.