to Celeronll:你说是把insert这句话是放到for循环内吗?那样的话是不是不对呀。 我在while之前测试adotable2.State为非dsEdit,不知道怎样才能改变adotable为dsEdit状态????
刚才把代码帖错了,问题还没有解决,请大家多多帮助。 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;
我在while之前测试adotable2.State为非dsEdit,不知道怎样才能改变adotable为dsEdit状态????
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;
到底是想在Table1还是Table2里面插入记录?