base.SqlHandle.execute

Executes a simple SQL statement (without result set).

Syntax

execute()

Usage

Call the execute() method to execute the prepared SQL statement, without producing a result set (INSERT, UPDATE, DELETE, CREATE TABLE, ...).

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

If the SQL statement contains ? parameter place holders, issue a setParameter() call for each parameter before executing the SQL 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

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

For a complete example, see Example 1: SqlHandle with simple SQL.