利用adotable定位记录,不管eidt1中输入什么,老是能找到记录,怎么回事?adotable1.Locate('bisbn',edit1.text,[loCaseInsensitive]);

解决方案 »

  1.   

    数据集 adotable,Locate时,如果找不到,他会自动移到最后一条的,
    你应该用
      if adotable1.Locate('bisbn',edit1.text,[loCaseInsensitive]) then
         dosomthing...........;
      

  2.   

    adotable1.Locate('bisbn',edit1.text,[loPartialKey]);
    这样看看
      

  3.   

    to SunKinXing(飞火流星):locate在没找到的情况下会返回false!
      

  4.   

    to WuLoveXue(晕死,又这样)不要误导loCaseInsensitive Key fields and key values are matched without regard to case.loPartialKey Key values can include only part of the matching key field value; for example, 'HAM' would match both 'HAMM' and 'HAMMER.'