-507   THE CURSOR IDENTIFIED IN THE UPDATE OR DELETE STATEMENT IS NOT OPEN

Explanation

The application program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement at a time when the specified cursor was not open.

System action

The statement cannot be processed. No update or delete was performed.

Programmer response

Check for a previous SQL return code that might have closed the cursor. SQLCODES -404, -652, -679,-802, -901, -904, -909, -910, -911, -913, and -952 may force the cursor to close. After the cursor is closed, any fetches or close cursor statements receive SQLCODE -501. Any updates or deletes receive this SQLCODE -507. Correct the logic of the application program to ensure that the specified cursor is open at the time the UPDATE or DELETE statement is executed.

SQLSTATE

24501