Método Close

Fecha a conexão com o banco de dados.

Sintaxe

Object.Close()

Argumentos - Object: Obrigatório. Sempre o nome do objeto ADODB Connection

Comentários

O exemplo a seguir ilustra o uso do método Close.

Exemplo 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