由于Table1.FindNearest(...)要建索引而且速度也慢有没有更好的方法呢?

解决方案 »

  1.   

    var bm:TBookMark;
    bm := Table.Bookmaek;
    ...
    Table.BookMark:=bm;
      

  2.   

    拿去看看,也许管用。
    procedure TForm1.Button1Click(Sender: TObject);
    var chStr:String;
        i:Integer;
    begin
          chStr:=Edit1.Text;
           for i:=Length(Edit1.Text)-1 downto 0 do
           begin
        if Table1.Locate('FirstName',chStr,[loCaseInsensitive, loPartialKey])   then
             Exit
             else Delete(chStr,i,1);
           end;
    end;
      

  3.   

    以上程序的应为
    for i:=Length(Edit1.Text) downto 1 do
    begin
      ....
    end;