|
||
The rowset cursor can navigate to all available rows in the rowset. The available rows depends on how the rowset is generated, and particularly on whether the rowset is an SQL view using an evaluation window.
The cursor has two valid locations outside of the actual rowset, known as the Beginning and the End. Initially and also following a reset, the cursor is positioned at the beginning.
As regards navigating to next and previous rows, the beginning is considered to lie immediately prior to the first row, and end is immediately following the last row. Navigating to the first row is equivalent to navigating to the next row from the beginning, which in an empty set takes the cursor to the end of the set (maybe not immediately obvious). A similar process holds for navigating to the last row of a set.
When updating or inserting a row, the cursor is in a special state which prevents navigation until the update or insertion is completed.
The cursor may also end up in two other states
after deletion of the current row it is "in limbo" between the two neighbouring rows. Navigating to next and previous will move to the respective row.
it may become invalid after an error during navigation: either due to failure in the store or file system, or due to loss of context when multiple rowsets are concurrently updating a table. Navigating to any fixed position (i.e. not next or previous) will restore the cursor.