logo  
Google
 

DB2 SQL-Error: -510

SQLState: 42828

Short Description: THE TABLE DESIGNATED BY THE CURSOR OF THE UPDATE OR DELETE STATEMENT CANNOT BE MODIFIED

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. This error code is also returned when the table exists at a remote location and DB2 has employed block fetching because you explicitly declared the cursor FOR FETCH ONLY, or because the application is bound CURRENTDATA(NO) and the cursor is ambiguous. This error code is also returned if DB2 has employed parallelism to execute the SELECT statement associated with the cursor named in a DELETE WHERE CURRENT OF cursor statement, or if a DELETE WHERE CURRENT OF is issued against a row which DB2 cannot guarantee to have not been modified by another application since the time the cursor was positioned upon it (in accordance with ISO(CS)) semantics for an ambiguous cursor in an application bound CURRENTDATA(NO)). System action: The statement cannot be processed. No data was updated or deleted in the object table. Programmer response: The requested UPDATE or DELETE cannot be performed. Refer to Chapter 5 of DB2 SQL Reference for information about restrictions on using UPDATE and DELETE operations against views. For a remote table, modify the DECLARE CURSOR and then rebind the PLAN. For a cursor that uses parallelism, disable parallelism for the query by using the DEGREE(1) BIND option for static SQL or by setting the CURRENT DEGREE special register to '1' for dynamic SQL. For an ambiguous cursor in an application bound CURRENTDATA(NO), either make the cursor unambiguous (declare it FOR UPDATE OF), or rebind the application CURRENTDATA(YES).

 <-  BACK TO INDEX