Purpose
Opens an ODBC data source connection.
Note
This method must be run on any DBConnection object prior to opening statements and executing database operations.
Syntax
DBConnection.OpenConnection (DSN [,Login] [, Password])
DSN |
Accepts any string expression that specifies a valid data source name as configured in the ODBC Data Source Administrator. |
Login |
Accepts any string expression that specifies the data source login. |
Password |
Accepts any string expression that specifies the data source password. |
Example
Sub Main()
Dim cnct As DBConnection
cnct.OpenConnection("MyDSN")
'Open the data source "MyDSN"
' Create statements and execute SQL...
' ...
cnct.CloseConnection
'Close the connection
End Sub
|