Call Level Interface Guide and Reference
DB2 CLI Version 5 introduced Scrollable Cursors; the ability to scroll
through a static read-only cursor:
- Forward by one or more rows
- Backward by one or more rows
- From the first row by one or more rows
- From the last row by one or more rows
- From a previously stored location in the cursor
The scrollable cursor is static. Once it is created no rows will be added
or removed, and no values in any rows will change. The cursor is not affected
by other applications accessing the same data.
The cursor is also read-only. It is not possible for the application to
change any values. How the rows of the cursor are locked, if at all, is
determined by the isolation level of the statement used to create the cursor.
Refer to the SQL Reference for a complete discussion of isolation levels and their effect.
It is important to understand the following terms:
- result set
- The complete set of rows that are generated by the SQL SELECT statement.
Once created the result set will not change.
- rowset
- The subset of rows from the result set that is returned after each fetch.
The application indicates the size of the rowset before the cursor is created.
Each call to SQLFetchScroll() populates the rowset with the
appropriate rows from the result set.
- bookmark
- It is possible to store a pointer to a specific row in the result set; a
bookmark. Once stored, the application can continue to move throughout the
result set, then return to the bookmarked row to generate a rowset. See "Using Bookmarks with Scrollable Cursors" for complete details.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]