首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

这个SQL语句写解决思路

2012-03-16 
这个SQL语句写统计记录数保存到参数depcount。select count(*) from Department完整代码要怎么写?Set rsSe

这个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)

热点排行