Description |
Depending on how the access with ACCESS was set for the table, FIRSTREC returns different results:
Marking (-2): last record in marking list
Number (-1) : filesize(db)
Index (0..15) : record with the biggest index information
Example: Complete discending pass through a table via an index
db:=OpenDB(...);
access(db,1); // Set access on index
x:=lastrec(db);
WHILE x DO
readrec(db,x);
... here the record is available
x:=prevrec(db)
END;
|