如何获得count返回值?

解决方案 »

  1.   

    说清楚点
    ------------------------------------
    体验速度,体验CSDN论坛助手:http://community.csdn.net/Expert/TopicView.asp?id=4700683
      

  2.   

    就是sql语句中的count函数如何取得他的返回值
      

  3.   

    select count(*)
    from tb你在delphi中需要他的值吗?adoQuery.sql.text :='select count(*) as a from tb';
    adoQuery.oepn;
    with adoQuery do
    while not eof do
    begin
       s :=intToStr(adoQuery.FieldByName('a').values);
    end CSDN论坛浏览器:http://CoolSlob.ys168.com/
      

  4.   

    var
     count:integer;
    begin
     With Adoquery do
      begin
       Close;
       Sql.clear;
       Sql.text:='Select count(*) as Quantity from Table1'
       Open;
       count:=fieldbyname('Quantity').asstring;
      end;
    end;