Borland®
Shop
Products Downloads Services Support Partners News & Events Company Community

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


DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.
 
Site Map Search Contact