Contents IndexRESIGNAL statement RETURN statement

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      RESUME statement

Function

To resume a procedure following a query.

Syntax

     Syntax 1.
          RESUME cursor-name

     Syntax 2.
          RESUME [ ALL ]

Parameters

     cursor-name:    identifier, or host-variable

Usage

Syntax 1: Embedded SQL, procedures, triggers, and batches.

Syntax 1 using a host-variable is for Embedded SQL only.

Syntax 2: ISQL.

Permissions

The cursor must have been previously opened.

Side effects

None.

See also

Description

This statement resumes execution of a procedure that returns result sets. The procedure executes until the next result set (SELECT statement with no INTO clause) is encountered. If the procedure completes and no result set is found, the SQLSTATE_PROCEDURE_COMPLETE warning is set. This warning is also set when you RESUME a cursor for a SELECT statement.

The ISQL RESUME statement (Format 2) resumes the current procedure. If ALL is not specified, executing RESUME displays the next result set or, if no more result sets are returned, completes the procedure.

The ISQL RESUME ALL statement cycles through all result sets in a procedure, without displaying them, and completes the procedure. This is useful mainly in testing procedures.

Examples

Embedded SQL example

     1. EXEC SQL RESUME cur_employee;
     2. EXEC SQL RESUME :cursor_var;

ISQL examples

     CALL sample_proc() ;
     RESUME ALL;

Contents IndexRESIGNAL statement RETURN statement