Informix Error -4109
-4109 An expression of type DATE or DATETIME is expected.
In an EVENT statement, a function definition or declaration, an EXTERNAL REPORT statement, a HANDLER statement, a function invocation, or just an expression, the compiler found something other than a DATE or DATETIME expression.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4109 fires when a context accepting either DATE or DATETIME finds something else — per
the official guidance, this can occur in an EVENT statement, a function definition or
declaration, an EXTERNAL REPORT statement, a HANDLER statement, a function invocation, or
a plain expression.
- A non-
DATE/non-DATETIMEexpression used where either is required, per the official guidance — the direct, only cause.
Solutions / Resolution
- Supply a genuine
DATEorDATETIMEexpression, converting the value first if needed.
Examples
A non-date expression where DATE or DATETIME is required
EVENT MyEvent(qty INTEGER)
-- -4109: if qty is used somewhere requiring DATE or DATETIME
Corrected
EVENT MyEvent(d DATE)
Diagnostic Checks
- Check the expression's actual type against the context accepting
DATE/DATETIME, and convert it if necessary.
Related Errors / Related Topics
- -4106 — "An expression of type DATETIME is expected." A related, stricter
type-requirement covering only
DATETIME. - -4107 — "An expression of type INTEGER or SMALLINT is expected." The same type-requirement pattern applied to integer types.
- -4108 — "An expression of type DATE is expected." A related, stricter
type-requirement covering only
DATE.
A DATE or DATETIME expression is required but something else was found — supply or convert
to one of those types.