社区
ASP
帖子详情
set rs =nothing 为什么它还在
hhmmss
2003-08-22 03:50:03
set rs =server.createobject("adodb.recordset")
...
....
rs.close
set rs = nothing
if isobject(rs) then
response.write "我还没死"
end if
怎么释放了对象,它还死赖着不走呢?我需要大家的帮助!
...全文
27
7
打赏
收藏
set rs =nothing 为什么它还在
set rs =server.createobject("adodb.recordset") ... .... rs.close set rs = nothing if isobject(rs) then response.write "我还没死" end if 怎么释放了对象,它还死赖着不走呢?我需要大家的帮助!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
hhmmss
2003-08-23
打赏
举报
回复
谢谢各位,我明白了!
IamScout
2003-08-22
打赏
举报
回复
太对了,用的话就出错。呵呵
zifan1980
2003-08-22
打赏
举报
回复
if isobject(rs) then
response.write "我还没死"
end if
对象释放了值为空,而对想本身在页面中还存在,不过已经不能用了
taogx
2003-08-22
打赏
举报
回复
释放不等于变量不存在了
例如:char *p=(char*)malloc(1024);
free(p)
以后释放了内存,但是变量p还是存在,并且是char *型。
sailor001
2003-08-22
打赏
举报
回复
你在次调用rs对象看看能不能再使用,如果不能再使用就说明已经释放了
snail2011
2003-08-22
打赏
举报
回复
if isobject(rs) then
这句话在程序中是起什么作用的!
你是前面放了,
但你在同一个页面中又再次调用了,它就在呀!
haper99
2003-08-22
打赏
举报
回复
不是很懂,路过,帮你up一下
rs
.close;
set
rs
=nothing;conn.close;
set
conn=nothing
rs
.close 关闭记录集
set
rs
=nothing 显式声明该变量为"无",期望占用的内存能回收(实际情况是常常无法回收)conn.close 关闭数据库连接
set
conn=nothing 显式声明该变量为"无",期望占用的内存能回收(实际情况跟...
asp中
rs
.addnew与
rs
.update更新数据库的方法
rs
.addnew '增加一条新的空的数据记录
rs
("
rs
1")="添加的数据" ...
set
rs
=nothing '对已有数据进行修改
rs
("
rs
1")="修改后的数据"
rs
.update
rs
.close
set
rs
=nothing =========================...
asp
rs
开启关闭问题
如果用了
set
rs
= nothing 从内存中清除
rs
对象,再次加载
rs
对象就需要使用
set
rs
=server.createobject("adodb.record
set
")重新创建对象;如果没有用
set
rs
= nothing 从内存中清除
rs
对象,再次加载
rs
对象,使用了
set
...
对记录集出现的一些问题的总结
1.
set
rs
=nothing和
rs
.close的异同点
set
rs
=nothing是清空对象 ,要将对象从内存中完全删除,可将对象变量设置为 Nothing。
rs
.close 是关闭对象, 使用 Close方法可关闭 Connection 对象或 Record
set
对象...
rs
.open 与conn.execute()的区别
我们平时再写asp程序执行查询时,一般有两种写法:
set
rs
=server.createobject("adodb.record
set
") sql="select top 10 id,name from tablename"
rs
.open sql,conn,1,1 和 sql="select top 10 id,...
ASP
28,391
社区成员
357,060
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章