Informix Error -4494: Missing named parameter "name" does not have default value.
Cause and resolution
Missing named parameter "name" does not have default value.
The indicated function invocation does not list a value for a parameter, and the declaration for the function does not provide a default value for it. Either add a default value in the declaration, or add a name/value pair here in the invocation.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4494 fires when a named-parameter call omits a value for a parameter that has no default in the function's declaration — per the official guidance, either the declaration needs a default value, or the call needs to supply this name/value pair.
- A named-parameter call omitting a required (no-default) parameter, per the official guidance — the direct, only cause.
Solutions / Resolution
- Add a default value in the function's declaration, per the official guidance, or
- Add the missing name/value pair to the call, per the official guidance.
Examples
Omitting a required named parameter
FUNCTION save(id INTEGER, status CHAR(10)) RETURNING INTEGER
...
END FUNCTION
CALL save(id: 1001)
-- -4494: "status" has no default and wasn't supplied
Corrected
CALL save(id: 1001, status: "New")
Diagnostic Checks
- Check every named-parameter call for a missing parameter with no default, and either supply the value or add a default in the declaration.
Related Errors / Related Topics
- -4493 — "Named parameters are allowed only for formal functions/reports." A related named-parameter error, about the function needing a formal declaration at all.
- -4495 — "Duplicate or invalid parameter name." A related named-parameter error, about the parameter name itself being wrong rather than missing a required value.
A named-parameter call omits a required parameter with no default — supply the value or add a default.