我需要将对象设置为空 [英] do i need to set objects to nothing
问题描述
Hi Folk
我的项目中有大约1000个程序。其中很多很多都是沿着
行的
函数myfuntion()为boolean
出错时goto er
'' -
Dim Dbs as dao.database
Dim Rst as dao.recordset
Dim SqlS as string
'' -
sqls =" ..."
set dbs = currentdb
set rst = dbs.openrecordset(sqls)
,而不是rst.eof
.....
rst.movenext
loop
'' -
xt:
退出功能
er:
msgbox错误$
resume xt
结束功能
应该将dbs和rst设置为空或不必要。如果是这样的话,
有人知道一次更新我所有程序的简单方法吗?
TIA
- Nicolaas
Hi Folk
I have about 1000 procedures in my project. Many, many of them are along
the lines of
function myfuntion () as boolean
on error goto er
''-
Dim Dbs as dao.database
Dim Rst as dao.recordset
Dim SqlS as string
''-
sqls = "..."
set dbs = currentdb
set rst = dbs.openrecordset(sqls)
do while not rst.eof
.....
rst.movenext
loop
''-
xt:
exit function
er:
msgbox error$
resume xt
end function
Should set dbs and rst to nothing or is that not necessary. If so, does
anyone know of an easy way to update all my procedures at once?
TIA
- Nicolaas
推荐答案
resume xt
结束功能
应该将dbs和rst设置为空或者没有必要。如果是这样的话,
有人知道一次更新我所有程序的简单方法吗?
TIA
- Nicolaas
resume xt
end function
Should set dbs and rst to nothing or is that not necessary. If so, does
anyone know of an easy way to update all my procedures at once?
TIA
- Nicolaas
2005年5月14日星期六12:45:23 +1200,< xtra"
< wi *** *******@hottermail.com>写道:
我愿意,我会绝对关闭记录集对象
(rst.Close)。
您可以编写代码来更新代码。查看Module对象的属性和
方法。虽然不是很有趣。最好这样做第一次正确
。
-Tom。
On Sat, 14 May 2005 12:45:23 +1200, "xtra"
<wi**********@hottermail.com> wrote:
I would, and I would DEFINITELY close the recordset object
(rst.Close).
You can write code to update your code. Check out the properties and
methods of the Module object. Not a lot of fun though. Better do it
right the first time.
-Tom.
Hi Folk
我的项目中有大约1000个程序。其中很多很多都是在函数myfuntion()中使用函数myfuntion()作为boolean
出错了goto er
'' -
Dim Dbs as dao.database
Dim Rst as dao.recordset
Dim SqlS as string
'' -
sqls =" ..."
set dbs = currentdb
set rst = dbs.openrecordset(sqls)
虽然不是rst.eof
.....
rst.movenext
循环
'' -
xt:
退出功能呃:
msgbox错误
Hi Folk
I have about 1000 procedures in my project. Many, many of them are along
the lines of
function myfuntion () as boolean
on error goto er
''-
Dim Dbs as dao.database
Dim Rst as dao.recordset
Dim SqlS as string
''-
sqls = "..."
set dbs = currentdb
set rst = dbs.openrecordset(sqls)
do while not rst.eof
.....
rst.movenext
loop
''-
xt:
exit function
er:
msgbox error
resume xt
结束功能>
应将dbs和rst设置为空或不必要。如果是这样,是否有人知道一次更新我所有程序的简单方法?
TIA
- Nicolaas
resume xt
end function
Should set dbs and rst to nothing or is that not necessary. If so, does
anyone know of an easy way to update all my procedures at once?
TIA
- Nicolaas
这篇关于我需要将对象设置为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!