各位:我要获取我所做的查询的结果数目,并显示出来我应该怎么做呢?

解决方案 »

  1.   

    showmessage(inttostr(adoQuery.recordcount));
    adoQuery要是在OPEN状态下!
      

  2.   

    query1.recordcount;
    table1.recordcount; 祝:身体健康 ,答案和分数同样重要 :)——!!!
      

  3.   

    你如果使用DBGrid绑定的话,可能是不行。如果你想得到你想要的结果那样显示,建议使用ListViewk控件来显示。
      

  4.   

    在你做查询的时候,增加一列
    如select aa identify,* from table where ......
    就可以了。。
      

  5.   

    错了,应该是这样的。。
    select IDENTITY(int ,1,1) as aa ,* into #temp from tableselect * from #temp
    然后在想去DataBind这个结果表。
    我想用存储过程来实现可能更好点。