BDE API Examples (DbiGetRelativeRecord)
DbiGetRelativeRecord positions the cursor on a record in the table relative to the current position of the cursor.
Example 1: Move table to record number if the table has that many records
This example uses the following input:
fGotoRecno(Table1, 5); //Goes to record 5;
The function is defined as follows:
procedure fGotoRecno(Tbl : TTable; recno : integer);
var
RP : RecProps;
begin
if Tbl.RecordCount < recno then
exit; //Not enough records in table
Tbl.First;
DbiGetRelativeRecord(Tbl.Handle, recno, dbiNoLock, Nil, @RP);
Tbl.Resync([]);
end;
Back to BDE API Reference Page