简单的流程问题 和 resume 问题

happymingnan 2003-10-10 03:15:57
On Error GoTo getRS_Error
strConnection = "Provider=Microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\"
strConnection = strConnection & "Client.mdb"
strArray = Split(sql) '这是什么意思?
con.Open strConnection '打开连接
rs.Open Trim$(sql), con, adOpenKeyset, adLockOptimistic
Set getRS = rs '返回记录集
iflag = 1
getRS_Exit:
Set rs = Nothing
Set con = Nothing
Exit Function
getRS_Error:
MsgBox "查询错误:" & Err.Description
iflag = 2
Resume getRS_Exit

最后一句resume getrs_exit 是什么意思啊? 如果发生错误跳到getrs_exit, 关闭
rs,con. 那么如果没发生错误的话, rs是不是就没有被清空,con连接是不是就没有关闭. 那样合理吗?
...全文
63 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
射天狼 2003-10-10
  • 打赏
  • 举报
回复
resume getrs_exit 从getrs_exit处继续执行!!

7,789

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧