adotable2.Insert这句话要放在循环里面
因为你在循环里面已经把数据集的状态置为BROWSE了,因为你已经POST过了
所以抱错

解决方案 »

  1.   

    to Celeronll:你说是把insert这句话是放到for循环内吗?那样的话是不是不对呀。
    我在while之前测试adotable2.State为非dsEdit,不知道怎样才能改变adotable为dsEdit状态????
      

  2.   

    刚才把代码帖错了,问题还没有解决,请大家多多帮助。      while not adotable1.Eof do
          begin
            adotable2.Insert;
            for j:=1 to adotable1.Fields.Count-1 do
              with adotable2.Fields[j] do
                adotable1.Fields[j].Value:='right';
            adotable2.Post;
            adotable1.next;
          end;
      

  3.   

    你在ADOTable2里面Insert,然后却修改ADOTable1的字段值,不出错才怪!
    到底是想在Table1还是Table2里面插入记录?
      

  4.   

    my god.居然犯了这么低级的错误,真是不好意思。