EPUB | CHM | PDF

Example: Min, Max, Position, RecordCount, First, Next

Top Previous Next

To read through all records in a table and update the ProgressBar accordingly:

procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;
begin
  with ProgressBar1 do
  begin
    Min := 0;
    Max := MySQLTable1.RecordCount;
    MySQLTable1.First;
    for i := Min to Max do
    begin
      Position := i;
      MySQLTable1.Next;
    end;
  end;
end;