1,DELPHI程序产生的临时文件,不能避免
2,大小写敏感,

解决方案 »

  1.   

    1、这些是query建的临时表,要用的,你不用理它。
    2、建议使用sql语句进行查询。
      

  2.   

    to netlib:
    使用sql语句进行查询怎么确定是否有符合条件的记录?难道生成一个表,判断它是否为空吗?太麻烦了吧.to lanbaba:
    我输入的是汉语不存在大小写的问题吧.
      

  3.   

    这样试试:
    form1.query2.locate('xxmc',edit3.text,[])
      

  4.   

    to snakeguo:
    我需要完全匹配
      

  5.   

    用query查,写sql语句,然后判断是否为空
      

  6.   

    to dreamfan:
    绝对有符合条件的记录,我用DATABASE DESKTOP看过
      

  7.   

    to lanbaba:
    我的确试了好久,我说过我在另外一个程序中试了同一条语句值又为TRUE,
    我想问问你们高手是否有可能是QUERY.locate本生有什么限定之类的问题
    声明:我决不是个懒惰的人
      

  8.   

    with query do 
      begin
        close;
        sql.clear;
        sql.add('select * from tablename where xxmc=:t1');
        params[0].value:=trim(edit3.text);
        Open;
      end;
      

  9.   

    to asminis:
    如何得到是否找到没有的信息呢
      

  10.   

    1、不管它
    2、with query do 
      begin
        close;
        sql.clear;
        sql.add('select * from tablename where xxmc='+edit3.text);
        Open;
      end;
      

  11.   

    写个语句就搞定了
    'select * from tablename where xxmc='+edit3.text
      

  12.   

    我现在不是要对符合条件的记录进行操作,我仅仅只想判断一下有没有这样的记录,主要是要得到一个TRUE OR FALSE各位的高见我知道是正确的,但好象不能解决问题
      

  13.   

    form1.query2.locate('xxmc',trim(edit3.text),[loCaseInsensitive])
      

  14.   

    是否你这两个语句之前的对edit3.text和xxmc操作代码一样,也有可能是你在其中的一段代码中有语句改变了两者之一的结果。
      

  15.   

    有新发现:Locate should return True if a record is found that matches the specified criteria and the cursor repositioned to that record.这是帮助中说的.也就是返回值要为TRUE有两个条件
    1.a record is found that matches the specified criteria
    2.the cursor repositioned to that record.
    但我不知道指针重新配置是什么意思,该怎样实现.
    望高手们指点
      

  16.   

    卧蝶:    这个EASY!
       
        query.close;
        query.sql.clear;
        query.sql.add(select * From test);
        try
          query.open
        except
          query.excute
        end;
        if query.eof then
          begin
           showmessage('没找到记录');
          end;
      

  17.   

    卧蝶:这个easy! 建议你使用QUERY空间  query.Close;
      query.sql.clear;
      query.sql.Add('select * from hr_post');
      query.open;
      if query.eof then
         showmessage('没找到记录')
      else
         showmessage('有记录');
      

  18.   

    有新发现:Locate should return True if a record is found that matches the specified criteria and the cursor repositioned to that record.这是帮助中说的.也就是返回值要为TRUE有两个条件
    1.a record is found that matches the specified criteria
    2.the cursor repositioned to that record.
    但我不知道指针重新配置是什么意思,该怎样实现.
    望高手们指点
      

  19.   

    form1.query2.locate('xxmc',trim(edit3.text),[])
    大小写先不要忽略,试试
      

  20.   

    不改就不改
    if locate('xxmc',edit3.text,[loCaseInsensitive]) then
        showmessage('找到');
      

  21.   

    卧碟:  
        你好!你的短消息,我收到了。我觉得你的语法有点问题!
    一般LOACTE语句是对Table控件进行操做的。应该这样:
       var 
         LocateSuccess : Boolean;
         SearchOptions : TLocateOptions;
       begin
         LocateSuccess := Table2.Locate('xxmc',edit3.text);
         if LocateSuccess then
            showmessage('查找成功')
         else
            showmessage('查找失败');
       end;   你若加了[loCaseInsensitive]选项,表示忽略大小写,若你要
       严格匹配,就别加[loCaseInsensitive]   祝你好运!                        ATCG
      

  22.   

    是否在Locate之前,要定位到First