Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to connect to a database with rdo connection
Message
From
25/01/1999 09:50:59
 
 
To
23/01/1999 06:57:49
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00179360
Message ID:
00179800
Views:
21
Hi,

It's a sample to rapidly create an rdo connection using odbc when having the DSN string.
Private mrdoEnvironment     As rdoEnvironment
Private mrdoConnection      As rdoConnection

....

   rdoEngine.rdoDefaultCursorDriver = rdUseOdbc
    Set mrdoEnvironment = rdoEngine.rdoCreateEnvironment("", "", "")
        
    ' if DSN string is initialized
    If mstrODBCDSNStr <> vbNullString Then
        Set mrdoConnection = mrdoEnvironment.OpenConnection("", rdDriverNoPrompt, , mstrODBCDSNStr)
        
        ' verify if connection succeed
        fblnConnectToODBC = Not (mrdoConnection Is Nothing)
    End If

.....
mstrODBCDSNStr is a string that must have the following form:
"DSN=DOT32;UID=admin;PWD=orange"

where "DOT32" is the datasource name
"admin" is the user name
and "orange" is the password of the ODBC connection

hope it's what you want.
Previous
Reply
Map
View

Click here to load this message in the networking platform