THIS FUNCTION HAS CHANGED IN FILEFLEX 3.0|
You may sometimes want to get to the beginning (top) or to the end (bottom) of a database file. FileFlex supplies two functions for these purposes. DBTop and DBBottom are both subject to the logical record order. If you've got a current index or relation operating, DBTop will take you to the logical first record and DBBottom to the logical last record.
To get to the top of the current database file and retrieve the value of the first record in the file, use the DBTop function. This will position the current record pointer to the top record in the database (physical record or, if an index is open, the first record in index order). You can then use DBGetCurrRecVal to retrieve the data in this record into fields or a container as desired.
DBSkip, DBTop, and DBBottom are now relation-aware. If there's an active relation, these functions will now work according to the relation that's currently active. If there is no active relation, these functions will work according to the index that's currently active.