Search code examples
ms-accessado.netjetms-access-2016

Trying to connect to an access with a UDL file


I'm trying to connect to an Access database via a UDL file. I'm wanting to generate a connection string so that I can connect to an access database via ADO.NET. It's been a few years since I've tried to do this.

I have Visual Studio 2015 Pro and Microsoft Access 2016 installed on my Windows 10 x64 pro machine. When I create a .udl file I have the following available options:

  • Microsoft OLE DB Provider for ODBC Drivers

  • Microsoft OLE DB Provider for Search

  • Microsoft OLE DB Provider for SQL Server

  • Microsoft OLE DB Simple Provider

  • MSDataShape

  • OLE DB Provider for Microsoft Directory Services

  • SQL Server Native Client 11.0

I think that in years past I would also see Microsoft Jet 4.0 OLE DB in this list. From the research I've done I think that Jet 4.0 is deprecated and that I should be using the Access Database Engine. I find the following versions that I think are that:

Microsoft Access Database Engine 2010 Redistributable

Microsoft Access 2013 Runtime

Microsoft Access 2016 Runtime

I downloaded the x64 version of Microsoft Access 2016 Runtime and when I try to install it I get the following error:

We can’t install the 64-bit version of Office because we found the following 32-bit programs on your PC: Office 16 Click-to-Run Extensibility Component Please uninstall all 32-bit Office programs, then retry installing 64-bit Office. If you want to install 32-bit Office instead, please run the 32-bit setup.

I've tried the 32-bit version of the Microsoft Access 2016 Runtime and I get the same message:

We can’t install the 32-bit version of Office because we found the following 64-bit programs on your PC: Office 16 Click-to-Run Extensibility Component 64-bit Registration Please uninstall all 64-bit Office programs, then retry installing 32-bit Office. If you want to install 64-bit Office instead, please run the 64-bit setup.

I've tried closing all open Microsoft Office and Visual Studio applications and I get the same error. Am I installing the right component? Any way to get it to install correctly?


Solution

  • You probably miss the ACE driver listed here - and only this, not the runtimes:

    Microsoft Access Database Engine 2010 Redistributable