String1:='99';
Locate(String1,Fieldname1,[loCaseInsensitive]);
定位在字段FieldName1=string1的地方

解决方案 »

  1.   

    query.clear;
    filter:='%'+filter+'%';
    query.sql.add('select * from tablename');
    query.sql.add('where yourfield like filterStr');
    query.paraments.parambyname('filterStr').AsString:=filterStr;
    query.Active:=True;
      

  2.   

    tikkypeng(千两狂死郎)是正确的,
     
      

  3.   

    以上是可以在Edit中按一個字符就模糊找到最近的記錄嗎﹖我明天試試﹗可以的話加分。 
      

  4.   

    查找定位
    Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean;
    Options:
        loCaseInsensitive  : 绝对匹配
        loPartialKey          :相似匹配,
    查找第一个相似的记录定位。
      

  5.   

    查找定位
    Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean;
    Options:
        loCaseInsensitive  : 绝对匹配
        loPartialKey          :相似匹配,
    查找第一个相似的记录定位。打开Filtered 功能可以过滤。
    和一般的条件语句一样,通配符用‘*’;