Informix Error -835: Current clause is invalid in interactive mode.
Cause and resolution
Current clause is invalid in interactive mode.
The WHERE CURRENT OF clause is meaningful only in a program that uses a cursor to read rows. In this interactive context, you must specify a condition other than CURRENT in your WHERE clause.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-835 fires when WHERE CURRENT OF is used in an interactively-typed statement rather than inside
a program driving a cursor — per the official guidance, CURRENT OF is only meaningful when a
cursor is actually open and positioned, which the interactive context doesn't provide.
- A positioned
UPDATE/DELETE ... WHERE CURRENT OF cursor-nametyped directly into the interactive tool, per the official guidance — there's no open cursor in that context forCURRENT OFto refer to. - SQL copy-pasted from a program's embedded SQL into the interactive tool, carrying over a
WHERE CURRENT OFclause that only made sense in the original program context.
Solutions / Resolution
- Specify a condition other than
CURRENTin theWHEREclause, per the official guidance — identify the target row(s) by their actual column values instead. - If positioned update/delete behavior is genuinely needed, write and run a program (SPL routine or embedded-SQL client code) that declares and drives the cursor, rather than typing the statement interactively.
Examples
The disallowed interactive attempt
UPDATE orders SET status = 'shipped' WHERE CURRENT OF order_cursor;
-- -835: no cursor is open in this interactive context
Corrected — an ordinary condition instead
UPDATE orders SET status = 'shipped' WHERE order_id = 42;
Diagnostic Checks
- Check whether the statement was typed interactively rather than run from within a program driving an actual open cursor.
Related Errors / Related Topics
- -507 — "Cursor cursor-name not found." A related
WHERE CURRENT OFerror, about a cursor name that isn't currently open, rather than the interactive context lacking cursor support entirely.
CURRENT OF requires an actual open, positioned cursor — use an ordinary WHERE condition
interactively instead.