RAD Studio
ContentsIndex
PreviousUpNext
Using the Next and Prior Methods

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 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:

CustTable.Prior;

 

CustTable->Prior();

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

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!