table连接的是某张表,表里有多少条记录,table的recordcount就是多少。使用了fileter,表里的数据就会减少吗?当然不会咯  

解决方案 »

  1.   

    不行的,我建议你用Query吧,可以动态构造。
      

  2.   

    recordcount是integer型的,当然是个数了.应该配合字段属性使用.
      

  3.   

    Bob7946建议的没错,复杂的数据最好使用TQuery.
      

  4.   

    给你一个例子:
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, Db, DBTables;type
      TForm1 = class(TForm)
        Query1: TQuery;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
    begin
      query1.Close;  //query1连接到了DBDEMOS
      query1.SQL.Clear;
      query1.SQL.Add('select * from employee where empno>140');
      query1.Open;
      showmessage(inttostr(query1.recordcount));
    end;end.
      

  5.   

    这么说是无法取得符合条件的数据个个数了,看来还是sql好啊