Uses DM所在的单元
with DM.Query1 do
begin
close;
sql.Clear;
sql.Add('select * from 表 where Filed1=(select ** from where Filed2='''+combobox2.text+''')');
open;
end;
with DM.Query1 do
begin
close;
sql.Clear;
sql.Add('select * from 表 where Filed1=(select ** from where Filed2='''+combobox2.text+''')');
open;
end;
try
Query1.Close;
except
on E:exception begin
ShowMessage(e.Message);
end;
end;
看看是什么错误再确定