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: