OledbConnection.Dispose()是否关闭连接? [英] Does OledbConnection.Dispose() close the connection?
本文介绍了OledbConnection.Dispose()是否关闭连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
OledbConnection.Dispose()
是否关闭连接?
我知道 SqlConnection
可以,但是 OledbConnection
又如何呢?
I am aware that SqlConnection
does but what about OledbConnection
?
推荐答案
是的,它也可以。
来源:< a href = http://msdn.microsoft.com/zh-cn/library/aa325891%28v=vs.71%29 rel = nofollow noreferrer> OleDbConnection.Dispose方法(布尔型)
Dispose方法调用Close,并从
的连接池中删除OleDbConnection。
The Dispose method calls Close, and removes the OleDbConnection from the connection pool.
有关详细信息,请参见参考链接上的备注
部分以了解情况释放托管和非托管资源。
For detailed information see the Remarks
section on the reference link to know about the case of releasing both managed and unmanaged resources.
这篇关于OledbConnection.Dispose()是否关闭连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文