Informix Error -746
-746 message-string
You supply message-string for this message. You can apply this message to error conditions that you specify in an SPL routine. The corrective action for this error depends on the condition that caused it. You, the user, define both the condition and the message text.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-746 is Informix's mechanism for fully custom, application-defined error messages — per the
official guidance, an SPL routine raises it via RAISE EXCEPTION -746, 0, 'message-string', and
the developer defines both the triggering condition and the message text entirely.
- An SPL routine's own business-logic validation failing, raising -746 with a message describing the specific rule that was violated — the general, intended use case.
- A triggered action's validation routine rejecting an insert/update/delete for a reason specific to the application's domain, with -746 carrying a human-readable explanation.
Solutions / Resolution
- Read the specific
message-stringreturned — per the official guidance, the corrective action depends entirely on that message's content, since the developer who wrote the raising routine defined both the condition and the text. - Locate the
RAISE EXCEPTION -746, 0, '...'call that produced this specific message, by searching the application's SPL routines for the message text (or a close match, if it's partly dynamic). - Address the underlying condition the message describes, whatever business rule or validation it represents — the fix is specific to that application-level rule, not something generic to -746 itself.
Examples
Raising a custom message
CREATE PROCEDURE validate_order_total(p_total DECIMAL)
IF p_total <= 0 THEN
RAISE EXCEPTION -746, 0, 'order total must be positive';
END IF;
END PROCEDURE;
Locating the source of a specific message
SELECT data FROM sysprocbody WHERE datakey = 'T' AND data LIKE '%order total must be positive%';
Diagnostic Checks
- Search SPL routine source (
sysprocbody) for the exact message text to find which routine raised it and under what condition.
Related Errors / Related Topics
- -745 — "Trigger execution has failed." The generic, message-less counterpart to this fully-customizable application-defined error.
The message text itself is the diagnostic — search SPL routine source for it to find the exact condition being enforced.