以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- 数据库链接要关闭吗 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=149552) |
-- 作者:jswalley -- 发布时间:2020/5/6 10:41:00 -- 数据库链接要关闭吗 Dim ErrMsg As String Dim Conn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\data\\Northwind.mdb;Persist Security Info=False" If Connections.TryConnect(Conn,ErrMsg) = False Then MessageBox.Show("数据源无法连通,原因:" & ErrMsg) Else MessageBox.Show("数据源可以连通!") End If 用这个代码连接300多个数据库,进行数据查询,查询之后,连接如何关闭? 删除就可以了? Delete 删除指定名称的数据源。
|
-- 作者:有点蓝 -- 发布时间:2020/5/6 10:43:00 -- 删除就可以了 |