fiona啦啦
幼苗
共回答了18个问题采纳率:88.9% 举报
1、dim rst as new adodb.recordset
以后不可以set rst=nothing,执行此语句不会出错,rst也不会等于nothing.
2、dim rst as adodb.recordset
set rst=new adodb.recordset
以后可以set rst=nothing,此时执行这条语句rst可以等于nothing
至于效率是一样的它们是一样的
1年前
追问
3
万泉水
举报
你说第一种使用后可以不能用set rst=nothing是什么意思?要设那样的话,多个这样的对象变量不能销毁,应该占用较大内存资源了吧
举报
fiona啦啦
这样的全局变量不会很多,局部变量离开过程或函数时就自动销毁了,不用你去处理。 习惯于set ...=nothing的你就用第二种吧。