base.SqlHandle.open

Opens the SQL handle (SELECT or INSERT cursor).

Syntax

open()

Usage

Call the open() method to execute the prepared SQL statement, and open the result set cursor or insert cursor.

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

If the SQL statement contains ? parameters:
  • For a statement with a result set (SELECT), values must be provided for each parameter before the open() call.
  • For an insert cursor, values must be provided after the open() call, before each put() call.

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

Example

CALL sh.open()