For clsD3Connection objects - returns the ODBC data source name that was passed as the second parameter to the brOpenConnection method. For clsD3Environment objects - returns the ODBC data source name that was used in the most recent brOpenConnection method.
sValue = object.brDatabase
Parameter | Description |
---|---|
sValue | The return value is a String data type specifying the ODBC data source name. |
object | An object variable that represents an object in the Applies To list. |
Private Sub Connection_Click() Dim oEnv As New clsD3Environment Dim oConn As clsD3Connection On Error GoTo D3ErrorHandler Set oConn = oEnv.brOpenConnection("ODBC", txtDSN.Text) MsgBox "Successfully connected using ODBC DSN = " & oConn.brDatabase oEnv.brCloseConnection oConn Set oEnv = Nothing Exit Sub D3ErrorHandler: MsgBox "Unable to connect" Set oEnv = Nothing Exit Sub End Sub