RAD Studio |  |

Using the Next and Prior Methods
See Also
Collapse All

The Next method moves the cursor forward one row in the dataset and sets the BOF property to False if the dataset is not empty. If the cursor is already at the last row in the dataset when you call Next, nothing happens.

For example, the following code moves to the next record in CustTable:

Copy Code

    CustTable.Next;

Copy Code

    CustTable->Next();

The Prior method moves the cursor back one row in the dataset, and setsEOF to False if the dataset is not empty. If the cursor is already at the first row in the dataset when you call Prior, Prior does nothing.

For example, the following code moves to the previous record in CustTable:

Copy Code

    CustTable.Prior;

Copy Code

    CustTable->Prior();

Note: The Prior method raises an exception in unidirectional datasets.
See Also

Using the First and Last Methods

Using the MoveBy Method

Using the Eof and Bof Properties

Marking and Returning to Records

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!