Informix Error -4059: More actual arguments than formal arguments for function "name".
Cause and resolution
More actual arguments than formal arguments for function "name".
This statement invokes function name, but it specifies more argument expressions than were called for in the declaration of function name. Check the syntax of the argument list. Review the declaration of the function for the expected number and type of arguments.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4059 fires when a function call passes more argument expressions than the function's declaration calls for — per the official guidance, the number of actual arguments exceeds the declared formal argument count.
- A function call with more argument expressions than the function's declared parameter list, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the syntax of the argument list, per the official guidance.
- Review the declaration of the function for the expected number and type of arguments, per the official guidance.
Examples
Too many arguments in a call
FUNCTION save(id INTEGER) RETURNING INTEGER
...
END FUNCTION
CALL save(1001, "extra")
-- -4059: save() takes only one argument
Corrected
CALL save(1001)
Diagnostic Checks
- Check the argument count at every call site against the function's declared parameter list.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4059 in this set yet.
A function call passes more arguments than the function declares — check the declaration's expected argument count.