procedure TForm1.BitBtn1Click(Sender: TObject);
begin
if not AdoQuery1.Active then
AdoQuery1.Open;
Gauge1.MaxValue := AdoQuery1.RecordCount;
AdoQuery1.First;
with AdoQuery1do
begin
while Not Eofdo
begin
Gauge1.Progress := RecNo;
AdoQuery1.MoveBy(1);
Application.ProcessMessages;
end;
end;
end;