各位前辈:
     ADOTable有什么方法、函数、属性可以实现对字段进行模糊查找或者不精通查找,谢谢,万分感激!
                                                            jackyrong

解决方案 »

  1.   

    可以用Adodataset控件
    例如:
    Adodataset1.close;
    Adodataset1.connection := Adoconnection1;
    Adodataset1.commontext := 'select * from 表名 where 字段名 Like ' + Edit1.text;
    //若查询的字段为文本型则为
    Adodataset1.commontext := 'select * from 表名 where 字段名 Like ''' + Edit1.text + ''''; 
    Adodataset1.open;
      

  2.   

    带loPartialKey参数的locate可以支持部分匹配。
      

  3.   

    不知道你注意到没有Fileter支持%,虽然这个在帮助里没有提到。
    AdoTable1.filter:='name like '+ quotedstr('张%');
    AdoTable1.filtered:=true;
      

  4.   

    用Like语名,k为变量
     如......目录 like Quotedstr(k);
      

  5.   

    如果不熟悉的话,可以使用AdoDataset或者AdoQuery,直接写Sql语句:
    select * from Tablename where TableField like %value%