{
Min, Max, Position, RecordCount, First, Next example
// Reads through all records in Customers (a table on Windows 
// and SQLDataSet on Linux)
// Updates the ProgressBar accordingly.
}
procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;
begin
  with ProgressBar1 do
  begin
    Min := 0;
    Max := Customers.RecordCount;
    Customers.First;
    for i := Min to Max do
    begin
      Position := i;
      Customers.Next;
      // do something with the current record
    end;
  end;
end;
 
