Informix Error -4495: Duplicate or invalid parameter name.
Cause and resolution
Duplicate or invalid parameter name.
The name of a parameter specified in the invocation of the function does not match any of the names in the declaration of that function, or it is not a valid NewEra identifier. Check its spelling.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4495 fires when a named-parameter call's name doesn't match any parameter in the function's declaration, or isn't a valid NewEra identifier — per the official guidance, check the spelling.
- A named-parameter call using a name not declared on the function, per the official guidance — the first named case.
- The name isn't a valid NewEra identifier, per the official guidance — the second named case.
- The same parameter name supplied more than once in one call, per the official guidance — implied by "duplicate."
Solutions / Resolution
- Check the spelling of the parameter name, per the official guidance, against the function's actual declaration.
Examples
A misspelled named parameter
FUNCTION save(order_id INTEGER) RETURNING INTEGER
...
END FUNCTION
CALL save(oder_id: 1001)
-- -4495: "oder_id" doesn't match the declared parameter "order_id"
Corrected
CALL save(order_id: 1001)
Diagnostic Checks
- Check every named-parameter call's names against the function's actual declared parameter names, and correct any spelling mismatch or duplicate.
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.
- -4494 — "Missing named parameter "name" does not have default value." A related named-parameter error, about a missing required parameter rather than an invalid name.
A named-parameter call uses a name that doesn't match the function's declared parameters, or supplies it twice — check the spelling.