Informix Error -1321
-1321 A validation error has occurred as a result of the VALIDATE command.
The VALIDATE statement tests the current value of variables against rules that are stored in the syscolval table. It has detected a mismatch. Ordinarily, the program would use the WHENEVER statement to trap this error and display or correct the erroneous values. Inspect the VALIDATE statement to see which variables were being tested and find out why they were wrong.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1321 fires when the VALIDATE statement finds a mismatch between current variable values and
the validation rules stored in syscolval — per the official guidance, this is the documented
mechanism for catching values that violate stored column-validation rules.
- A variable's current value not matching the validation rule stored for its corresponding
column in
syscolval, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use a
WHENEVERstatement to handle the error, per the official guidance, so the program can respond to validation failures gracefully. - Inspect which variables failed validation testing, per the official guidance, to determine the specific correction needed.
Examples
Handling VALIDATE failures with WHENEVER
WHENEVER ERROR CALL handle_validation_error
VALIDATE order_id, status, total
Diagnostic Checks
- Identify which specific variable(s) failed validation, and compare their current values
against the rules stored in
syscolvalfor the corresponding columns.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1321 in this set yet.
VALIDATE found a variable value that violates its stored syscolval validation rule — handle
with WHENEVER and inspect the specific failing variable(s).