conn.execute执行问题

scabwort 2008-07-06 01:25:21
当执行conn.execute时,为什么直接可以用,像
set rs= conn.execute("select top 10 ntitle,id,ndate from article where nsubname='公告' and id not in(select top 1 id from article where nsubname='公告' order by id desc) order by id desc")
但是把sql放在变量里就不行

set sql="select top 10 ntitle,id,ndate from article where nsubname='公告' and id not in(select top 1 id from article where nsubname='公告' order by id desc) order by id desc" '分页查询
set rs= conn.execute(sql)
执行没什么反映
用response.Write(rs.state)也没反映
原来是set rs= conn.execute(sql)之一句后就什么也不执行

请问一下,这是为会
...全文
52 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
scabwort 2008-07-06
  • 打赏
  • 举报
回复
谢谢,平常我还没注意~~
wcwtitxu 2008-07-06
  • 打赏
  • 举报
回复
set sql="....."

sql = "........."

基本类型传递前面不加 Set

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧