Delphi Examples: DbiSetToSeqNo

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiSetToSeqNo

Return to chapter overview

Position the cursor to the specified sequence number of the table.

If the table is not a Paradox type, the cursor is not moved. Call the TTable component’s Resync method after repositioning the record pointer with DbiSetToRecordNo to synchronize the TTable with the underlying dataset.

This example uses the following input:

 fDbiSetToSeqNo(Table1, 40);

 

The procedure is:

procedure fDbiSetToSeqNo(var Tbl: TTable; RecNum: Longint);

var

 Props: CurProps;

begin

 Check(DbiGetCursorProps(Tbl.Handle, Props));

if (StrComp(Props.szTableType, szPARADOX) = 0) then

   Check(DbiSetToSeqNo(Tbl.Handle, RecNum));

 Tbl.Resync([]);

end;