begin
adoquery2.first
for t:=0 to adoquery2.recordcount-1 do
begin
FileNo:=trim(adoquery2.fieldbyname('文件号').AsString);
dbedit2.Text:=fileno;
showmessage(fileno);
with adoquery1 do
begin
close;
sql.Clear;
sql.Add('select * from old where 文件号='''+fileno+'''');
open;
adoquery2.Next;
end;
end;