[AccessD] Error opening ADODB connection

dw-murphy at cox.net dw-murphy at cox.net
Sun Oct 24 18:46:15 CDT 2021


I have a MS Access application that has been in use for at least 10 years. Recently I moved my work to a new development machine with Office 365 (Access 2019) and SQL Server Express 2019 installed. The machine OS is Windows 10 Pro. In my old machine my application would run just fine. There is a query using a stored procedure that retrieves a piece of data from a table in the SQL Server backend. I call this procedure using a ADODB recordset based on the stored procedure output. All my calls use a connection string based on an ODBC DNS. This connection string works fine on the new machine when relinking tables to the SQL Server backend, but when I use it in the ADODB connection I get an error "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". On the old Windows 7 development machine this ran fine. It also runs on the client's machines which are Windows 10 and Office 365. The code that raises the error follows. The error occurs at the open connection line. The connection string is: ODBC;DSN=VROM;Trusted_Connection=Yes;APP=2019 Microsoft Office system;DATABASE=VROM1.

Set con = New ADODB.Connection
            con.ConnectionString = DLookup("Link", "tblLinkData", "Use = True")
            con.Open
     Set rs = New ADODB.Recordset
My question "Is there a setting in SQL Server that could be causing this error?". As far as I can tell both systems are set up the same, but there is obviously something different between the two. Is there another reason this could be working on one system and not another?





More information about the AccessD mailing list