蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

[asp][求助]使用sub无法关闭rs

关闭rs的sub,放在conn.asp里

[code]sub closers()
rs.close
set rs=nothing
end sub
[/code]

文章显示左部的分类查询,封装在sub里放在_body页面。

[code]dim cat_id,class_id
sql="select cat_id,class_id from art where art_id="&request.querystring("art_id")
set rs=hgamecn.execute(sql)
cat_id=rs("cat_id")
class_id=rs("class_id")
select case cat_id
case 1
action="1.asp"
case 2
action="2.asp"
case 3
action="3.asp"
end select
closers[/code]

结果调试时显示缺少对象rs。
但是将closers换成
rs.close
set rs=nothing
又可以通过。
迷惑!望各位高手指点~~

Call closers()
try......................

主程序未声明rs为全局变量

xbrr在上个帖子中说

谢谢,解决了。没考虑还要声明变量……




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com