关闭与数据库的连接。
语法
Object.Close()
参数 - Object:必需。始终为 ADODB Connection 对象的名称
注释
以下示例说明了 Close 方法的用法。
示例 1:
'Create ADODB.Connection Object
Dim ConnObj ' Create a variable.
Set ConnObj = CreateObject("ADODB.Connection")
ConnObj.Open("ConnectionString") 'Creates DB Connection by Using Connection String
'Do all the operations by using ADODB Connection Object based on the requirement
ConnObj.Close()
Set ConnObj = Nothing