代码如下:while not DataModule1.ADOQuery1.Eof do 
DataModule1.ADOTable2.Close;
DataModule1.ADOTable2.Open;
DataModule1.ADOTable2.InsertRecord(……);
Datamodule1.ADOQuery1.Next;

解决方案 »

  1.   

    while not DataModule1.ADOQuery1.Eof do 
    begin //加上的
    DataModule1.ADOTable2.Close;
    DataModule1.ADOTable2.Open;
    DataModule1.ADOTable2.InsertRecord(……);
    Datamodule1.ADOQuery1.Next;
    end;//加上的
      

  2.   

    ADOQUERY效率可能更好一些。
    另外一百条应该是没有问题的
      

  3.   

    DataModule1.ADOTable2.Close; 
    DataModule1.ADOTable2.Open;
    while not DataModule1.ADOQuery1.Eof do 
    begin //加上的   
      DataModule1.ADOTable2.InsertRecord(……);
      Datamodule1.ADOQuery1.Next;
    end;//加上的
      

  4.   

    用了InsertRecord就不要再用Close 和 Open 语句了
      

  5.   

    Look!!DataModule1.ADOTable2.Open;
    Datamodule1.ADOQuery1.open;
    Datamodule1.ADOQuery1.first;
    while not DataModule1.ADOQuery1.Eof do 
    begin //加上的   
      DataModule1.ADOTable2.InsertRecord(……);
      Datamodule1.ADOQuery1.Next
    end;//加上的
    ////来凑个热闹.
      

  6.   


    >>>>下面兩行代碼是自找死!
      DataModule1.ADOTable2.Close; //去掉
      DataModule1.ADOTable2.Open;//去掉
    >>修改過的代碼:
    if not DataModule1.ADOTable2.Active then DataModule1.ADOTable2.Open;
    while not DataModule1.ADOQuery1.Eof do 
    begin
      Application.ProcessMessages;
      DataModule1.ADOTable2.InsertRecord(……);
      Application.ProcessMessages;
      Datamodule1.ADOQuery1.Next;
    end
      

  7.   

    同意JonnySun() ,不错,!
    看来老兄还是很有认识的啊!
    >>>>下面兩行代碼是自找死!
      DataModule1.ADOTable2.Close; //去掉
      DataModule1.ADOTable2.Open;//去掉
    #####
    Application.ProcessMessages;
    不错!
      

  8.   

    DataModule1.ADOTable2.Close;
    DataModule1.ADOTable2.Open;
    while not DataModule1.ADOQuery1.Eof do 
    begin
    DataModule1.ADOTable2.InsertRecord(……);
    Datamodule1.ADOQuery1.Next;
    end;