for i:=0 to memo3.lines.count-1 do
begin
with adodateset1 do
try
if active then close;
CommandText:='select bh from kq where nm='''+memo3.lines[i]+'''';
open;
memo4.lines.Add(memo3.lines[i]+'的编号是'+fieldbyname('bh').asstring);
finally
close;
end;
end;
begin
with adodateset1 do
try
if active then close;
CommandText:='select bh from kq where nm='''+memo3.lines[i]+'''';
open;
memo4.lines.Add(memo3.lines[i]+'的编号是'+fieldbyname('bh').asstring);
finally
close;
end;
end;
for i:=0 to memo3.lines.count-1 do
begin
with adodateset1 do
try
if active then close;
CommandText:='select bh from kq where nm='''+memo3.Lines.Strings[i]+'''';
open;
memo4.lines.Add(memo3.lines.strings[i]+'的编号是'+fieldbyname('bh').asstring);
finally
close;
end;
end;