Informix Error -364
-364 Column column-name not declared for UPDATE OF.
This UPDATE...WHERE CURRENT OF cursor-name statement refers to at least one column that does not appear in the FOR UPDATE OF clause of the DECLARE statement that declared the cursor. Since specific columns were listed in the cursor declaration, the database server will not allow others to be updated. Review the declaration and the uses of this cursor. Perhaps the noted column, and others, should be added to the declaration, or perhaps the OF clause should be dropped, allowing the cursor to update any column in the table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-364 fires when an UPDATE ... WHERE CURRENT OF statement attempts to modify a column that
wasn't listed in the cursor's FOR UPDATE OF clause. Once a cursor is declared with a specific
column list in FOR UPDATE OF, the server locks down updates to exactly those columns — any
other column is off-limits through that cursor.
- An
UPDATE ... WHERE CURRENT OFnaming a column not included in the cursor'sFOR UPDATE OFlist — the direct cause. - A cursor's
FOR UPDATE OFlist written narrowly at declaration time, then application logic later needing to update a column that wasn't anticipated. - Copy-pasted cursor declarations carried over from a different update workflow with a different, narrower column list than what's actually needed here.
Solutions / Resolution
- Add the column to the cursor's
FOR UPDATE OFclause, per the official guidance, if it should genuinely be updatable through this cursor. - Remove the
OFclause entirely (leaving justFOR UPDATE) if updates to any column should be allowed, rather than maintaining a restrictive list. - Review why the column list was restricted in the first place — a narrow
FOR UPDATE OFlist is often intentional (limiting what a given code path can touch), so widening it should be a deliberate decision, not just a quick fix.
Examples
Adding the missing column to FOR UPDATE OF
DECLARE curs1 CURSOR FOR
SELECT order_id, status FROM orders FOR UPDATE OF status;
-- Later, trying to also update order_id:
UPDATE orders SET order_id = 5001 WHERE CURRENT OF curs1;
-- -364: order_id isn't in the FOR UPDATE OF list
Fix — add the column, or drop the restriction:
DECLARE curs1 CURSOR FOR
SELECT order_id, status FROM orders FOR UPDATE OF order_id, status;
-- or, to allow any column:
DECLARE curs1 CURSOR FOR
SELECT order_id, status FROM orders FOR UPDATE;
Diagnostic Checks
- Compare the column being updated against the cursor's
FOR UPDATE OFlist. - Confirm whether the restriction was intentional before simply widening it.
Related Errors / Related Topics
- -290 — "Cursor not declared with FOR UPDATE clause." A closely related restriction — this
error fires when
FOR UPDATEis missing entirely;-364fires when it's present but its column list doesn't cover the column being updated.
Either add the specific column to FOR UPDATE OF, or drop the OF qualifier entirely if any
column should be updatable — check whether the original restriction was intentional first.