Share via


Visual Basic: RDO Data Control

rdoEngine Object Example

This example sets a number of rdoEngine properties and creates a customized rdoEnvironment object based on these new default settings. Note that while your code can set a password in an rdoEnvironment object, it cannot be read once it is set.

  Dim en As rdoEnvironment
Private Sub Form_Load()
With rdoEngine
    .rdoDefaultLoginTimeout = 20
    .rdoDefaultCursorDriver = rdUseOdbc
    .rdoDefaultUser = "Fred"
    .rdoDefaultPassword = ""
End With
Set en = rdoEnvironments(0)
'
'   Dump current rdoEnvironments collection
'   and display current properties where 
'   possible.
'
For Each en In rdoEnvironments
    Debug.Print "LoginTimeout:" & en.LoginTimeout
    Debug.Print "CursorDriver:" & en.CursorDriver
    Debug.Print "User:" & en.UserName
   ' (Write-only) Debug.Print "Password:" & en.Password
Next
End Sub