-20185   CURSOR cursor-name IS NOT DEFINED TO ACCESS ROWSETS, BUT A CLAUSE WAS SPECIFIED THAT IS VALID ONLY WITH ROWSET ACCESS

Explanation

The FOR ROW n OF ROWSET clause was specified on a FETCH statement, but the cursor is not defined for rowset access.

System action

The statement cannot be processed.

Programmer response

Remove the FOR n ROWS clause from the FETCH statement, or redefine the cursor for multiple row access with the WITH ROWSET POSITIONING clause on DECLARE CURSOR or PREPARE.

SQLSTATE

24518