Informix Error -79888: Parameters are specified by both name and ordinal position for the same CallableStatement object.
Cause and resolution
Parameters are specified by both name and ordinal position for the same CallableStatement object.
A CallableStatement object must be consistent in the way it specifies parameters; that is, it must only use methods that take parameter names (String objects), or it must use only methods that take parameter ordinal positions (integers). A CallableStatement object that mixes the two types of references throws an SQLException object.
Specify parameters either by name or by ordinal for a particular CallableStatement object.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-79888 fires when a CallableStatement mixes name-based and ordinal-based parameter
references — per the official guidance, a CallableStatement must consistently use only
String-name methods or only integer-ordinal methods, never both.
- A
CallableStatementmixing name-based (String) and ordinal-based (integer) parameter references, per the official guidance — the direct, only cause.
Solutions / Resolution
- Specify parameters either by name or by ordinal for a given
CallableStatement, never both, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond mixed name/ordinal references.
Diagnostic Checks
- Check the
CallableStatement's parameter-access calls, and confirm they're all name-based or all ordinal-based, not mixed.
Related Errors / Related Topics
- -79887 — "Parameter name not found." A related
CallableStatementparameter error, on an unmatched name rather than mixing reference styles.
A CallableStatement mixed name-based and ordinal-based parameter references — use only
one style consistently.