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 ? parameters, values must be provided for each parameter before the openScrollCursor() call.

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()