如何在关闭connection之前,必定先关闭datareader,用try catch finally怎么实现
来源:百度知道 编辑:UC知道 时间:2024/06/07 16:13:30
如何在关闭connection之前,必定先关闭datareader,用try catch finally怎么实现
我需要专业的做法 谢谢
majunbopm ,您的写法datareader就要声明在try块外面了,在try块外面怎么声明datareader
我需要专业的做法 谢谢
majunbopm ,您的写法datareader就要声明在try块外面了,在try块外面怎么声明datareader
finally
{
if (!dr.IsClosed)
{
dr.Close();
}
if (conn.State != ConnectionState.Closed)
{
conn.Close();
}
}
在类的前面这么写:
private sqldatareader dr;
在需要用的地方:
dr=cmd.ExecuteReader();
你会加分么?
ADODB.Connection (0x800A0E78)对象关闭时,不允许操作。
draw a connection . draw 在这里是什么意思?
Internet Connection Firewall (ICF) / Internet Connection Sharing (ICS) 服务在启动时暂停。
如何在快速关闭WIN2000
如何在bios关闭硬盘?
ADODB.Connection与ADODB.Recordset 分别是什么?如何理解?
如何实现 Internet 共享?ADSL, 两台笔记本电脑,1394 Connection
如何把ado中的connection连接到内存中
在asp重复打开connection会占有资源吗?
asp中:是否每次对数据库进行操作都需要打开关闭connection?