如何实现执行存储过程反应到进度条中?为什么这个简单代码不能执行?高手帮忙...谢了...----------------------------------------------------------------------procedure TCalBalaForm.BitBtn1Click(Sender: TObject);
begin
    ADOStoredProc1.ExecProc;
    
    ProgressBar1.Min:=0;
    ProgressBar1.Max:=100;
    i := 0;
    timer1.Enabled:=true;
    
    Timer1Timer(self);
end;procedure TCalBalaForm.Timer1Timer(Sender: TObject);
begin
     ProgressBar1.Position:=trunc(i*100 div 999);
     self.Caption:=inttostr(i);
     label1.Caption:= inttostr(ProgressBar1.Position)+'%';
     I := i + 1;
     if  (ProgressBar1.Position=100) then
     begin
          timer1.Enabled:=false;
          ShowMessage('重算庫存成功!');
          Exit;
     endend;