As implemented in TDataSet, the value of RecNo is always -1. Ordinarily an application does not access RecNo at the TDataSet level. Instead a redeclared and implemented RecNo property in a descendant class such as TTable is accessed. RecNo provides a fallback property for derived datasets that do not support record numbers.
With Table1Do
Begin
Close;
SQL.Clear;
SQL.Add(' SELECT * FROM Kehu ');
Open;
Count := RecordCount;
End;
Table1.First;
While Not Table1.Eof Do
Begin
If Table1.RecNo Mod 2 = 0 Then
..........
Table1.Next;
End;
As implemented in TDataSet, the value of RecNo is always -1. Ordinarily an application does not access RecNo at the TDataSet level. Instead a redeclared and implemented RecNo property in a descendant class such as TTable is accessed. RecNo provides a fallback property for derived datasets that do not support record numbers.