Description |
In a way how the access is set with ACCESS for a table, FIRSTREC returns different results:
Marking (-2): first record in marking list
Number (-1) : 1 (if table is not empty)
Index (0..15) : Record with the smallest index information
Example: complete ordered passing through a table via an index
db:=OpenDB(...);
access(db,1); // Set access on index
x:=firstrec(db);
WHILE x DO
readrec(db,x);
... here the record is available
x:=nextrec(db)
END;
|