logo  
Google
 

DB2 SQL-Error: -508

SQLState: 24504

Short Description: THE CURSOR IDENTIFIED IN THE UPDATE OR DELETE STATEMENT IS NOT POSITIONED ON A ROW OR ROWSET THAT CAN BE UPDATED OR DELETED

The application program attempted to execute an UPDATE or DELETE WHERE CURRENT OF cursor statement at a time when the specified cursor was not positioned on a row or rowset of the object table. The cursor must be positioned on the row that is to be updated or deleted. This can occur if the cursor is no longer positioned on the row because another cursor in the same application program delete the row or updates an index column. This includes deletes and index column updates that are performed as a result of rolling back to a savepoint. This can also occur with a sensitive dynamic cursor when the FOR ROW n OF ROWSET clause is specified and the specified row of the current rowset has been updated or deleted. System action: The statement cannot be executed. No data was updated or deleted, and the cursor position is unchanged. Programmer response: Correct the logic of the application program to ensure that the cursor is correctly positioned on the intended row of the object table before the UPDATE or DELETE statement is executed. Note that for single row or non-rowset cursors, the cursors are not positioned on a row if FETCH returned SQLCODE +100.

 <-  BACK TO INDEX