Contents Index Configuring cursors on opening Fetching multiple rows

ASA Programming Guide
  Using SQL in Applications
    Working with cursors

Fetching rows through a cursor


The simplest way of processing the result set of a query using a cursor is to loop through all the rows of the result set until there are no more rows.

To loop through the rows of a result set

  1. Declare and open the cursor (embedded SQL), or execute a statement that returns a result set (ODBC, JDBC, Open Client) or AsaDataReader object (ADO.NET).

  2. Continue to fetch the next row until you get a Row Not Found error.

  3. Close the cursor.

How step 2 of this operation is carried out depends on the interface you use. For example,


Contents Index Configuring cursors on opening Fetching multiple rows