1. 程式人生 > >delphi執行查詢語句時的進度條怎麽做

delphi執行查詢語句時的進度條怎麽做

sage orm erro ror error: delphi procedure begin message

procedure TForm1.FormCreate(Sender: TObject);
begin
ADOQuery1.ExecuteOptions := [eoAsyncFetch];//設為異步讀取
end;
//ADOQuery的OnFetchProgress事件
procedure TForm1.ADOQuery1FetchProgress(DataSet: TCustomADODataSet; Progress, MaxProgress: Integer; var EventStatus: TEventStatus);
begin
ProgressBar1.Position := Progress;

ProgressBar1.Max := MaxProgress;
end;
//ADOQuery的OnFetchComplete事件
procedure TForm1.ADOQuery1FetchComplete(DataSet: TCustomADODataSet; const Error: Error; var EventStatus: TEventStatus);
begin
ProgressBar1.Position := ProgressBar1.Max;
ShowMessage(‘OK‘);
end;

delphi執行查詢語句時的進度條怎麽做