为什么没有结果呢
vark:integer;
begin
if combobox1.Text='所有' then
ownersqlstr:=''
else
begin
ADOQuery2.Close;
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add('select * from t_owner
where ownername=''combobox1.text''');
ADOQuery2.Open;
k:=ADOQuery2.FieldValues['owner'];
ownersqlstr:=' and A.trackid in
(select trackid
from v_equipstate
where owner=''k'')';
end;