WHILE NOT ADOQUERY.EOF DO
BEGIN
  每条记录都处理,然后写视图
END;

解决方案 »

  1.   

    条件func1(field1)=true,怎么着就为True,没说清楚func1实现的功能
    view是treeview还是listview? 
      

  2.   

    做一个循环,对每条记录的字段都判断FUNC1()
      

  3.   

    view =视图 or listview ?
      

  4.   

    while not table.eof do
    begin
      if func1(field1.asstring) then
       view.add(field1.asstring);
      table.next;
    end;
      

  5.   

    Table.Fields.field 是一个TList 类型
      

  6.   

    1.直接通过一个Sql语句
    select * from table1 where 字段 like '%'+参数+'%'
    2.利用循环
    建立临时表table1
    while not table.eof do
    begin
      if func1(参数) then
      begin
        Table1.add;
        Table1.fields[1].value=..
      end;
    end;
    其中func1函数可以这样写:
    funct1(fd:String,str:String)
    begin
       if pos(str,fd)>0 then result:=true else result:=false;
    end;