base.SqlHandle.openScrollCursor

Opens the SQL handle (with scrollable option).

Syntax

openScrollCursor()

Usage

Call the openScrollCursor() method to execute a prepared SQL statement, and open the result set for use with a scrollable SQL cursor.

The SQL statement must have been prepared with a prepare() call.

If the SQL statement contains ? parameter placeholders, issue a setParameter() call for each parameter, before opening the cursor.

After opening the scrollable cursor, use methods such as fetchFirst(), fetchPrevious() and fetchAbsolute(n) to move forwards and backwards in the SQL result set.

As with standard Genero SQL instructions, SQL errors can be trapped with WHENEVER ERROR or TRY / CATCH blocks and by testing sqlca.sqlcode.

Example

DEFINE sh base.SqlHandle
...
CALL sh.openScrollCursor()