Accuracer: The First And Only BDE Alternative
Client-Server Single-File Embedded Database for Delphi / C++Builder / Kylix

Navigating tables

Previous  Top  Next


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

Moves to the first row of the table.
Moves to the last row of the table.
Moves to the next row of the table.
Moves to the previous row of the table.
Moves a cursor to the specified record (RecNo is calculated with all filters applied to the table)

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 Accuracer component called CustTable:

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

© AidAim Software Accuracer: Benefits-bde Replacement Embedded Database For Delphi C\+\+ Builder Kyli