<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > GoTop |
Declaration
procedure GoTop;
Description
Go to the first record in the file. If an order is active, the first logical record is retrieved. If no index, the first physical record is retrieved.
A backwards skip from the top position will set Bof True and the record pointer will be repositioned to the first record.
Apollo always positions the record pointer to the first record in the file whenever the file is opened or whenever a single IDX or NTX index is opened with IndexOpen (logical record 1). If a compound index is opened (CDX or NSX), an explicit tag must be selected with SetOrder and GoTop must be called to set the record pointer to the first logical record.
If SetDeleted is True, and/or a filter is set with SetFilter or Query, or a scope is set, the record pointer will be positioned at the first record in the file that satisfies the imposed conditions.
Delphi Example
// Move to first record
ApTbl.GoTop;
C++Builder Example
// Move to first record
ApTbl->GoTop();
See Also