P pardboy Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #1 我用select count(*) form 表,查出来的记录数怎样调用呢?
L LeeChange Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #2 MyQuery.Close; MyQuery.SQL.Clear; MyQuery.SQL.Append('select count(*) form 表'); MyQuery.Open; Count:=MyQuery.Fields[0].AsInteger;
MyQuery.Close; MyQuery.SQL.Clear; MyQuery.SQL.Append('select count(*) form 表'); MyQuery.Open; Count:=MyQuery.Fields[0].AsInteger;
Y YNTW Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #3 var Total:Integer; Total:=Fields[0].AsInteger;
F flintsoft Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #4 你可以 select count(*) as xxx form 表 然后用FieldByName就可以了 aaa:=ADOQuery.FieldByName('xxx').AsString
L lovefox Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #5 你还可以a:=ADOQuery.Fields[0].AsString; a:=ADOQuery.Fields[0].AsInteger;
P pardboy Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-14 #6 我在clientdataset.commandtext中用的select count(*) form 表 没有fields[],只能用select count(*) as xxx form 表吗?