我调用数据表的时候为什么总是出现“Index is out of date! Index : KH”啊?
“KH”是我定义的一个二级索引。

解决方案 »

  1.   

    with Table1 do
      begin
        Indexname:='KH';
        Open;
        SetKey;
        FieldByname('卡号').AsString:=Edit1.Text;
        GotoNearest;
       ..................程序代码是这样的!
      

  2.   

    重建几次都不行,都是跳出同样的问题,请哪位大侠帮我看看我的二级索引设置是不是有问题啊?数据表应该不会有问题了,应该在代码上了。折磨死我啦!!!“Index is out of date! Index : KH”procedure TForm2.Button1Click(Sender: TObject);
    begin
      with Table1 do
      begin
        Indexname:='KH';
        Open;
        SetKey;
        FieldByname('卡号').AsString:=Edit1.Text;
        GotoNearest;
        IndexName:='PASS';
        Open;
        SetKey;
        FieldByname('密码').AsString:=Edit2.Text;
        GotoNearest;    if ((DBEdit1.Text<>Edit1.Text)or(DBEdit2.Text<>Edit2.Text))then
          ShowMessage('对不起,没有该用户!')
        else
          Form3.show;
      end;
    end;