Hello,
I have 2 cursors in my program that are declared with ' FOR UPDATE OF' option. Both these cursors update the same column of a particular table on different conditions. I am getting a -510 (-510 THE TABLE DESIGNATED BY THE CURSOR OF THE UPDATE OR DELETE STATEMENT CANNOT BE MODIFIED) on the 2nd cusor update statement.
Here is the pseudo code that I have in my program for update:
Cursor2 update:
EXEC SQL
UPDATE COVC B
SET D_END = DATE(

CL-COVC.D-END) - 1 DAY
WHERE CURRENT OF CURSOR2
Cursor3 update:
EXEC SQL
UPDATE COVC B
SET D_END = DATE(

CL-COVC.D-END) - 1 DAY
WHERE CURRENT OF CURSOR3
Explanation of -510: The application program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement against a table or view that cannot be updated or deleted. This can occur for a delete from a
read-only view or for an update in which the cursor was not defined with
the FOR UPDATE clause.
Also, I open, fetch and close each cursor seperately.
Can someone tell me what am I doing wrong?
Thanks.