Fetching and Scrolling

The operation to retrieve a row from a cursor is called a fetch. These are the fetch options:

When a cursor is opened, the current row position in the cursor is logically before the first row. This causes the different fetch options to have the following behaviors if they are the first fetch performed after the cursor is opened:

Transact-SQL cursors are limited to fetching one row at a time. API server cursors support fetching blocks of rows with each fetch. A cursor that supports fetching multiple rows at a time is called a block cursor.

Cursor Classifications

A cursor can be classified by the fetch options it supports:

Scrollable cursors are especially useful for supporting online applications. A cursor can be mapped to a grid or list box in the application. As the user scrolls up and down and all around the grid, the application uses scroll fetches to retrieve the rows from the cursor the user wants to see.

APIs for Fetching Rows

The APIs for the actual statements, functions, or methods used have different names to fetch rows:

See Also
Cursor Functions Using Cursors
FETCH  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.