与dbgrid相连的table、Query的recordcount就是dbgrid的总记录行数

解决方案 »

  1.   

    问题是现在我用table连接access数据库无法用Recordcount统计记录数,编译的时候总是说我的table.Recordcount中的Recordcount没有定义说明
      

  2.   

    你的table有没有连接表,有没有active,
    最好把你的程序列出来
      

  3.   

    var
    sqlcount:integer;
    with query do
    begin
    close;
    sql.clear;
    sql.add('select count(*) from table');
    open;
    sqlcount:=fields[0].asinteger;
    end;
    用状态条显示记录条数
    statusbar1.panels[0].text:=sqlcount+'条记录';
      

  4.   

    var
    sqlcount:integer;
    with query do
    begin
    close;
    sql.clear;
    sql.add('select count(*) from table');
    open;
    sqlcount:=recordcount;
    end;