读书人

这个SQL语句写解决思路

发布时间: 2012-03-16 16:34:56 作者: rapoo

这个SQL语句写
统计记录数保存到参数depcount。
select count(*) from Department

完整代码要怎么写?

Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select count(*) from Department where ParentID="&parid


depcount=conn.Execute(sql)

是这样吗?

[解决办法]
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select count(*) from Department where ParentID="&parid


depcount = conn.Execute(sql)(0)

读书人网 >ASP

热点推荐