ODBCDirect is no longer supported.
Posted on 2014-08-13
We are using a program that is no longer under support from the manufacturer. Its an older program with a SQL server backend. There is a button on this program that launches MSAccess in refrence to an mdb file. In Access 2010 and 2013 we get an error message "ODBCDirect is no longer supported. Rewrite the code to use ADO instead of DAO".
I looked in the Visual basic editor and I see that it is pulling from an ini file some connection parameters and I see these lines that I think need to be updated:
Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
'Open READ-ONLY connection object based on information entered in DSN.
Set dbsProsper = wrkODBC.OpenConnection("ProsperWorkspace", _
dbDriverNoPrompt, True, "ODBC;UID=" & gstrUID & ";PWD=" & gstrPWD & ";DSN=" & gstrDSN & ";")
Those variables gstrUID, gstrPWD and gstrDSN are retrieved from an ini file in code above that.
Also wrkODBC and dbsProsper are initizlized at the top of the module PRM_Routines as so:
Public wrkODBC As Workspace
Public dbsProsper As Database
Do you know if there is a quick and easy way to alter this to work in Access 2010 and 2013?
If you need the whole code, I can attach it as a text file.