[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Move the cursor position
Source position: db.pas line 1655
public function TDataSet.MoveBy( |
Distance: LongInt |
):LongInt; |
Distance |
|
Number of positions the cursor should be moved |
Number of positions the cursor actually moved
MoveBy moves the current record pointer with Distance positions. Distance may be a positive number, in which case the cursor is moved forward, or a negative number, in which case the cursor is moved backward. The move operation will stop as soon as the beginning or end of the data is reached. The TDataset.BeforeScroll and TDataset.AfterScroll events are triggered (once) when this method is called. The function returns the distance which was actually moved by the cursor.
A negative distance will result in an EDatabaseError exception on unidirectional datasets.
|
Current record number |
|
|
Event triggered before the cursor changes position. |
|
|
Event triggered after the cursor has changed position. |