brDatabase property

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.

Syntax

sValue = object.brDatabase

Parameters

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.

Example

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