I have this older VB6 application that I don't have the time to convert to VS2005 right now. I have the Oracle ODBC client installed and the DSN are created as system DSN's. They are not using the "Microsoft ODBC for Oracle" driver, instead they are using the actual Oracle driver. Ive tried several connection strings including:
I keep getting the error handler from my function:Code:cn.connectionstring = "Password=gers4us;Persist Security Info=True;User ID=gers;Data Source=NUREV" cn.connectionstring = "Password=" & gstrPassword & ";Persist Security Info=True;User ID=" & gstrUser & ";Data Source=" & gstrDSN cn.connectionstring = "Driver={Microsoft ODBC for Oracle};" & "UID=report;PWD=reportpw;DSN=nurev" cn.connectionstring = "Driver={Microsoft ODBC for Oracle};Server=nurev;Uid=report;Pwd=reportpw;"
...any ideas what the proper connection string is?Code:Public Function OpenDatabaseConnection() As Boolean On Error GoTo errhandler Dim connectionstring As String Set cn = New ADODB.Connection cn.Provider = "MSDAORA.1" 'cn.connectionstring = "Provider=OraOLEDB.Oracle.1;Password=gers4us;Persist Security Info=True;User ID=gers;Data Source=NUREV" 'cn.connectionstring = "Password=gers4us;Persist Security Info=True;User ID=gers;Data Source=NUREV" 'cn.connectionstring = "Password=" & gstrPassword & ";Persist Security Info=True;User ID=" & gstrUser & ";Data Source=" & gstrDSN 'cn.connectionstring = "Driver={Microsoft ODBC for Oracle};" & "UID=report;PWD=reportpw;DSN=nurev" cn.connectionstring = "Driver={Microsoft ODBC for Oracle};Server=nurev;Uid=report;Pwd=reportpw;" cn.Open OpenDatabaseConnection = True Exit Function errhandler: MsgBox "Connection failed, Enter Login Parameters Again", vbCritical OpenDatabaseConnection = False Exit Function End Function




Reply With Quote