请问,我用ado控件连接access数据库,又一个操作是更新1000条数据,速度特别慢,请问是什么原因,能解决嘛?谢谢!

解决方案 »

  1.   

    access库是这样,俺以前的程序也是这样,后来改用sql server就没问题了。
      

  2.   

    在1000条数据的情况下access库是这样d,
      

  3.   

    主要是这样遍历就会很慢
    while not self.Q_Select.Eof do begin
          if Aint=0 then begin
            if Q_Select.FieldByName('id').AsInteger > MaxID then begin
              Q_Select.Edit;
              Q_Select.FieldByName('glh').AsString:=FCurRecord;
              Q_Select.Post;
            end;
          end;
          if Aint=1 then begin
            FNewID:=FNewID+1;
            Q_Select.Edit;
            Q_Select.FieldByName('id').AsInteger:=FNewID;
            Q_Select.FieldByName('glh').AsString:=FCurRecord;
            Q_Select.FieldByName('wjglh').AsString:='';
            Q_Select.Post;
          end;
          Q_Select.Next;
        end;