logo  
Google
 

DB2 SQL-Error: -225

SQLState: 42872

Short Description: FETCH STATEMENT FOR CURSOR IS NOT VALID BECAUSE THE CURSOR IS NOT DEFINED AS SCROLL

A FETCH statement for cursor cursor-name has been specified and one of the following errors has occurred: v BEFORE and AFTER was specified as a fetch orientation on FETCH, but the cursor is not defined as a scrollable cursor. v PRIOR, FIRST, LAST, CURRENT, ABSOLUTE, or RELATIVE was specified as a row-positioned fetch orientation on FETCH, but the cursor is not defined as a scrollable cursor. NEXT is the only row-positioned fetch orientation that can be specified for cursors that are not scrollable. v PRIOR ROWSET, FIRST ROWSET, LAST ROWSET, CURRENT ROWSET, or ROWSET STARTING AT was specified as a row-positioned fetch orientation on FETCH, but the cursor is not defined as a scrollable cursor. NEXT ROWSET is the only rowset-positioned fetch orientation that can be specified for cursors that are not scrollable.System action: The statement cannot be processed. The cursor position is unchanged. Programmer response: Change the FETCH statement to remove the fetch orientation clause, for example, on PRIOR, FIRST, PRIOR ROWSET, FIRST ROWSET and so forth, to NEXT or NEXT ROWSET. Alternatively, you could change the definition of the cursor to be scrollable.

 <-  BACK TO INDEX