用一个ADODATASET,connection为adoconnection1,
一个adocommand,connection为adoconnection2,
with adodataset do
begin
close;
commandtext:='select * from a';
open;
end;
if adodataset.recordcount>0 then
begin
adodataset.first;
while not adodataset.eof() do
begin
adocommandtext.commandtext:='insert into b fields values('+adodataset.fieldbyname('')+'...)';
adocommandtext.Execute;
adodataset.next;
end;
end;