Informix Error -4155
-4155 Warning: Only static cursor names are allowed in the WHERE CURRENT OF
clause. Cursor name will be processed as a static cursor name.In the UPDATE and DELETE statements, the WHERE CURRENT OF cursor-name clause cannot cite a cursor name that has been declared as dynamic.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4155 is a compiler warning: per the official guidance, an UPDATE/DELETE statement's
WHERE CURRENT OF cursor-name clause cites a cursor name that was declared dynamic, but only
static cursor names are supported there — the compiler processes it as a static cursor name
regardless.
- A dynamically-declared cursor cited in a
WHERE CURRENT OFclause, per the official guidance — the direct cause.
Solutions / Resolution
- Confirm the cursor was intended to be treated as static in this context, per the official guidance's description of how the compiler processes it, or use a genuinely static cursor if dynamic behavior was needed elsewhere.
Examples
A dynamic cursor cited in WHERE CURRENT OF
DECLARE mycur CURSOR FOR SELECT * FROM orders;
...
UPDATE orders SET status = 'Shipped' WHERE CURRENT OF mycur;
Diagnostic Checks
- Check whether the cursor named in
WHERE CURRENT OFwas declared dynamic, and confirm static processing is acceptable, per the warning.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4155 in this set yet.
A dynamically-declared cursor is cited in WHERE CURRENT OF, which only supports static
cursor names — the compiler treats it as static regardless; confirm this is acceptable.