This document describes an error that occurs during the record fetch process by using a cursor to process a select statement that returns multiple records.
Altibase version 6.3.1 or later
To process a query statement that returns multiple records, a cursor (CURSOR) must be used in the following process.
- DECLARE CURSOR
- OPEN CURSOR
- FETCH CURSOR
- CLOSE/RELEASE CURSOR
Although the cursor is used as above, the FETCH process proceeds to some extent in the CURSOR FETCH stage, and the 'ERR-410D2 (266450) Fetch out of sequence' error occurs even though there are still records to be fetched at some point.
Below is an example where an error occurs when using the cursor and the result of the error.