Open Method
Opens a Connection to the data source. This method requires a connection string, which specifies the provider and database location.
Syntax
Object.Open(ConnectionString)
Arguments:
-
Object: Required. Always the name of
ADODB Connection
object. -
ConnectionString: Required. Which specifies the provider and database location
Remarks
The following example illustrates the use of the Open
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
ConnObj.Close()
Set ConnObj = Nothing