ClientName := lbSource.Items.Strings[lbsource.itemindex];
dmManage.adsClient.Seek(ClientName,soFirstEQ)
会出现如下错误:
对象或者提供者不能执行所需的操作。请问是怎么回事,如何解决?

解决方案 »

  1.   

    this method is only supported for use with Microsoft Access2000 and the Jet 4 provider
      

  2.   

    同意,
    其他还需注意:
    必须有索引
    commandtype=cmdTableDirect
    CusorLocate=clUseServer
    CursorType= ctKeySet.可以用locate代替
      

  3.   

    VAR
      ClientName:String;
    begin
      ClientName := lbSource.Items.Strings[lbSource.ItemIndex];
      lbObject.Items.Add(ClientName);
      if dmManage.adsClient.Locate('KHMC',ClientName,[]) then
      begin
        showmessage(dmManage.adsClient.FieldByName('KHMC').AsString);
        showmessage(inttostr(dmManage.adsClient.FieldByName('ZID').AsInteger));
        lbSource.DeleteSelected;
      end;
    end;我用上面的代码定位记录,结果SHOWMESSAGE显示出来的记录总在第一个。为什么啊?