zhenkong(方舟) :能说的详细点吗?

解决方案 »

  1.   

    query1.recordcount;祝:身体健康!
      

  2.   

    ghyghost(我要求delphi能理解我的心情) :好象tquery里没有recordcount这个属性吧?
      

  3.   

    query.recordcount有没有,你可以试一试;
    query.recno
      

  4.   

    query肯定有recordcount属性,返回打开记录集的记录总数
      

  5.   

    各位,问题解决了,但如果要得到某字段的最大值又该怎么做呢?还是在tquery里
      

  6.   

    with query do 
    begin
    close;
    sql.clear;
    sql.add('select max fieldname where tablename');
    Prepare;
    open;
    end;
      

  7.   

    (query as TQuery).RecordCount可能得到记录总数。
      

  8.   

    ihihonline(小小->充电中……) 
    with query do 
    begin
    close;
    sql.clear;
    sql.add('select max fieldname where tablename');
    Prepare;
    open;
    end;这样做了之后,字段最大值是保存在哪个变量里??
      

  9.   

    select count(*) from table
      

  10.   

    sql.add(select max(fieldname) as 变量名 from tablename )
      

  11.   

    var
      s: string;SQL.Add('select max(FieldName) from TableName');
    s := Query1.Fields[0].AsString;