在asp数据库操作程序中经常要关闭记录集对象清除对象,如果重复进行清除操作就会出现错误,一个解决的方法是先对对象的状态进行判断然后在进行相应的操作。如有问题竟联系我(vince6799@hotmail.com)或到本站获取最新信息(www.miplat.com)。
sub closers(crs)
if Not crs Is Nothing Then '对象未清除
if (crs.state and 1)=1 then
crs.close
end if
set crs=nothing
end if
end sub
sub endconnection(Econn)
if Not Econn is Nothing then
if (Econn.state and 1)=1 then
Econn.close
end if
set Econn=nothing
end if
end sub
在ASP数据库操作程序中,重复清除记录集对象会出错。解决办法是先判断对象状态再操作,文中给出了关闭记录集对象和结束连接对象的代码示例,还提供了联系方式和获取信息的网站。
3485

被折叠的 条评论
为什么被折叠?



