<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > Skip |
Declaration
procedure Skip( lNumRecs: LongInt );
Description
Skips forwards or backwards a specified number of records. If an order is active (i.e., an index), the skip will be in logical sequence. If no order is active, the skip will be in physical sequence.
After the skip operation, always test for beginning of file (if lNumRecs is negative) or end of file (if lNumRecs is positive) with Bof and Eof respectively.
Parameters
lNumRecs: The number of records to skip. If the number is positive, the skip is forward; if negative it is backwards.
Delphi Example
procedure Form1.Button1Click(Sender: TObject);
var
dTotal: Double;
begin
with ApTbl do
begin
if FLock then
begin
SetTurboRead( True );
GoTop;
dTotal := 0;
while not Eof do
begin
dTotal := dTotal + GetDouble( 'TVALUE' );
Skip( 1 );
end;
SetTurboRead( False );
end;
end;
end;
See Also