笨 笨人 Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-17 #1 使用ADOQuery 控件 如何用select count(*) from Phoneinform 把统计出的值赋给一个 变量counter,这条SQL该如何写?
憔 憔悴 Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-17 #2 ..... select count(*) as MyVar from Phoneinform ; ....... adoquery.open; counter:=adoquery.fieldByname('MyVar').asinteger
..... select count(*) as MyVar from Phoneinform ; ....... adoquery.open; counter:=adoquery.fieldByname('MyVar').asinteger
R rockjie Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-17 #3 DECLARE @rows int SET @rows = (select count(*) from Phoneinform)
I intrain Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-17 #4 select count(*) from Phoneinform adoquery.open counter:=adoquery.fields[0].value select count(*) mycount from Phoneinform adoquery.open counter:=adoquery.fieldbyname('mycount').asinteger 如果在MSSQL Server中,以上两种情况都可以
select count(*) from Phoneinform adoquery.open counter:=adoquery.fields[0].value select count(*) mycount from Phoneinform adoquery.open counter:=adoquery.fieldbyname('mycount').asinteger 如果在MSSQL Server中,以上两种情况都可以
Y yangxiao_jiang Unregistered / Unconfirmed GUEST, unregistred user! 2002-09-17 #5 用select count(*) from Phoneinform adoquery.open icounter:=adoquery.fields[0].value 可以 ,或用 select count(*) as icount from Phoneinform query1.open icounter:=query1.filedbyname('icount').asinteger; 我只知道这两种方法
用select count(*) from Phoneinform adoquery.open icounter:=adoquery.fields[0].value 可以 ,或用 select count(*) as icount from Phoneinform query1.open icounter:=query1.filedbyname('icount').asinteger; 我只知道这两种方法