Show: Delphi C++
Display Preferences

Using the Next and Prior Methods

From RAD Studio
Jump to: navigation, search

Go Up to Navigating Datasets


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:

CustTable.Next;
CustTable->Next();

The Prior method moves the cursor back one row in the dataset, and sets EOF 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:

CustTable.Prior;
CustTable->Prior();
Note: The Prior method raises an exception in unidirectional datasets.

See Also

Personal tools
In other languages
Previous Versions
Assistance