Contents IndexEXECUTE HLI Statement OPEN HLI Statement

User's Guide
   Part V. The SQL Anywhere Programming Interfaces
     Chapter 38. The WSQL HLI Interface
      FETCH HLI Statement

Syntax

     FETCH [ ABSOLUTE offset | RELATIVE offset ]
          ... cursor [ INTO hostvariablelist ]

     offset:    number

     cursor-name:    identifier, or host variable

     hostvariablelist:    list of host variables

Purpose

To retrieve a row from a cursor.

See also

DECLARE, PREPARE, OPEN.

Description

This command repositions a cursor and optionally puts the data from the new row into host variables (see "Host variables with WSQL HLI"). If a host variable list is not used, then the data from the new row can be obtained using the wsqlgetfield function.

The named cursor must be open.

The ABSOLUTE clause places the cursor on row number offset. The RELATIVE clause places the cursor offset rows forward or backward (if negative) in the result set. If both clauses are omitted, then the default behavior is to move the cursor forward one row.

This command is functionally similar to the Embedded SQL command FETCH. See "FETCH statement".

Contents IndexEXECUTE HLI Statement OPEN HLI Statement