The SqlHandle class / base.SqlHandle methods |
Fetches to a specified row in a scrollable SQL result set.
fetchAbsolute(position INTEGER)
Call the fetchAbsolute() method to fetch to the specified row in a scrollable SQL result set.
The SQL statement must have been opened with a openScrollCursor() call.
After performing the fetch call, you can query for column information with the getResultCount(), getResultName(index), getResultType(index) and getResultValue(index) methods.
If no row is found (end of result set), SQLCA.SQLCODE is set to 100 (NOTFOUND).
If the specified position does not correspond to a row position in the result set, SQLCA.SQLCODE is set to 100 (NOTFOUND).
As with standard Genero SQL instructions, SQL errors can be trapped with WHENEVER ERROR or TRY / CATCH blocks and by testing SQLCA.SQLCODE.
CALL sh.fetchAbsolute(10)