asp对数据库的操作中判断连接对象的状态
2012-03-09 00:00
274 查看
在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
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/vince6799/article/details/536382
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
$(document).ready(function(){dp.SyntaxHighlighter.HighlightAll('code');});
原文链接:
http://blog.csdn.net/vince6799/article/details/536382
相关文章推荐
- asp对数据库的操作中判断连接对象的状态
- ASP调用DLL总对象方法与数据库进行连接
- asp.net简单3层数据库连接读取操作
- ASP动态网站建设之连接数据库相关操作
- Python数据库操作、Python DB API、数据库连接对象connection、数据库游标对象cursor
- 2.测试持久化对象的状态:把hbm转化为DDL,Hibernate连接数据库工具类
- asp.net程序优化 尽量减少数据库连接操作
- 判断数据库连接状态
- asp基本操作-数据库连接-增删改查-搜索-session
- web.config配置数据库连接+Ado.net对象操作sql数据库
- 向asp.Net进发 数据库连接操作
- C# ADO.NET的五个常用对象及数据库连接操作
- ASP编程中连接数据库和数据库操作的常用代码
- asp.net连接数据库操作xml文件(读、写)
- Asp.Net连接Oracle数据库的通用类orahelper.cs并且利用它对数据库查询、汇总、更新等操作演示
- C# ADO.NET的五个常用对象及数据库连接操作
- Asp.Net连接Oracle数据库的通用操作类并且利用它对数据库查询、汇总、更新等操作演示
- ASP.NET(C#)连接数据库和操作数据库
- asp.net程序优化 尽量减少数据库连接操作
- ASP.NET中数据库的操作初步----连接并且打开数据库