Informix Error -9750: Routine routine_name determined during PREPARE and BIND/EXECUTE return different types.
Cause and resolution
Routine routine_name determined during PREPARE and BIND/EXECUTE return different types.
If host variables are used in the statement that is being prepared, in the absence of argument types information, the server tries to resolve to a routine that is most likely the routine to which the user intended to resolve. However, during BIND/EXECUTE time, in the presence of argument type information, the routine specified in the statement might resolve to a different routine. In that case, if the return types of the routine that the server originally selected are different than the one later resolved, this error is raised.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9750 fires when the routine resolved at PREPARE time and the routine resolved at BIND/EXECUTE time return different types — per the official guidance.
- Host variables used without argument-type information at PREPARE time, per the official guidance — causing the server to guess the intended routine; at BIND/EXECUTE time, with actual argument types available, resolution picks a different routine whose return type differs from the one guessed at PREPARE.
Solutions / Resolution
- Cast the host variable(s) to a specific data type, consistent with the official guidance's description of the cause, so PREPARE-time resolution matches BIND/EXECUTE-time resolution.
Examples
N/A
No specific triggering statement is documented; the specific overload set and host variables vary.
Diagnostic Checks
- Check the statement for untyped host variables passed to an overloaded routine, and add explicit type casts.
Related Errors / Related Topics
- -9751 — "Cannot prepare the statement because the return type of the routine routine_name is not known." A related PREPARE-time routine-resolution error, on the return type being entirely unknown rather than resolving inconsistently between PREPARE and EXECUTE.
The routine resolved differently at PREPARE and BIND/EXECUTE time, with different return types — cast the host variable(s) to a specific type.