base.SqlHandle.prepare

Prepares an SQL statement for the SQL handle.

Syntax

prepare( sql-text STRING )

Usage

Call the prepare() method to prepare the SQL statement that will be executed with either execute() or open().

The SQL statement can contain ? parameter place holders, to be filled with the setParameter() method before executing the statement.

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.prepare("INSERT INTO mytable VALUES (?,?)")