Informix Error -19841: Error In Specifying Automatically (Server) Generated Keys.
Cause and resolution
Error In Specifying Automatically (Server) Generated Keys.
Possible causes are: column does not exist in table, or column is not a SERIAL or SERIAL8 or BIGSERIAL. Other causes are null String, null array, empty array or unknown constant. (Valid constants are NO_GENERATED_KEYS or RETURN_GENERATED_KEYS).
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-19841 fires when auto-generated-key specification is invalid — per the official guidance.
- The named column not existing in the table, per the official guidance.
- The named column not being
SERIAL/SERIAL8/BIGSERIAL, per the official guidance. - A null string, null array, or empty array supplied, per the official guidance.
- An unknown constant supplied — the only valid constants are
NO_GENERATED_KEYSandRETURN_GENERATED_KEYS, per the official guidance.
Solutions / Resolution
- Confirm the named column exists and is
SERIAL/SERIAL8/BIGSERIAL, per the official guidance. - Use a non-null, non-empty value, per the official guidance.
- Use only
NO_GENERATED_KEYSorRETURN_GENERATED_KEYSas the constant, per the official guidance.
Examples
An unknown generated-keys constant
NOT_A_VALID_CONSTANT
Corrected
RETURN_GENERATED_KEYS
Diagnostic Checks
- Check the target column's existence and type, and the constant used, against the documented requirements.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -19841 in this set yet.
Auto-generated-key specification is invalid — check the column's existence/type and the
constant used (NO_GENERATED_KEYS/RETURN_GENERATED_KEYS).