/*
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.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  ProgressBar1->Min = 0;
  ProgressBar1->Max = Customers->RecordCount;
  Customers->First();
  for (int i = ProgressBar1->Min; i <= ProgressBar1->Max; i++)
  {
    ProgressBar1->Position = i;
    Customers->Next();
    // do something with record...
  }
} 
