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/
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;
------------------------------------
体验速度,体验CSDN论坛助手:http://community.csdn.net/Expert/TopicView.asp?id=4700683
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/
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;