brDatabase Property 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