EasyTable: Single-File Embedded Database,
a BDE replacement for Delphi and C++Builder



Navigating tables
Previous  Top  Next


Introduction

There are the following basic methods you can use in application code to move to different records:

Method
Description
First
Moves to the first row of the table.
Last
Moves to the last row of the table.
Next
Moves to the next row of the table.
Prior
Moves to the previous row of the table.
MoveBy   
Moves a specified number of rows forward or back in the table.

                     
Note
All these methods are based upon the current index order.

In addition to these methods, the following table describes two Boolean properties of tables that provide useful information when iterating through the records in a table.
The BOF and EOF properties indicate whether the record pointer is at the beginning of the table or it is at the end of the table, respectively.

The following code illustrates one of the ways you might code a record-processing loop for an EasyTable component called CustTable:

CustTable.First; Go to first record, which sets EOF False
while not CustTable.EOF do Cycle until EOF is True
begin
Process each record here
...
CustTable.Next; EOF False on success; EOF True when Next fails on last record
end;



© AidAim Software EasyTable: