if combobox1.Text<>'全部' then
begin
table2.First;
while not table2.Eof do //在这里为什么进入了死循环???
begin
if table2.Locate('btbz',p_btbz,[]) then
begin
p_xlh_list.Add(table2.fieldbyname('xlh').asstring);
end;
table2.Next;
end;
end;
begin
table2.First;
while not table2.Eof do //在这里为什么进入了死循环???
begin
if table2.Locate('btbz',p_btbz,[]) then
begin
p_xlh_list.Add(table2.fieldbyname('xlh').asstring);
end;
table2.Next;
end;
end;
begin
table2.First;
while not table2.Eof do //在这里为什么进入了死循环???
begin
if table2.Locate('btbz',p_btbz,[]) then
begin
//
end;
table2.Next;
end;
end;
table2.open;
table2.filtered:=false;
table2.filter:='btbz='+p_btbz;
table2.filtered:=True;
则
table2.filter:='btbz='''+p_btbz+'''';
begin
table2.First;
while not table2.Eof do
begin
if table2。FieldByName('btbz').AsString ='p_btbz' then //假设为字符型,其它类型一样判断!
begin
//
end;
table2.Next;
end;
end;