Close Method
Closes the connection to the database.
Syntax
Object.Close()
Arguments - Object: Required. Always the name of ADODB
Connection
object
Remarks
The following example illustrates the use of the Close
method.
Example 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