Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

ODBCDirect is no longer supported.

Avatar of ITdiamond
ITdiamondFlag for United States of America asked on
Microsoft Access
10 Comments1 Solution661 ViewsLast Modified:

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.