0

I am trying to connect to an access database through the "Connect to Database" wizard in Visual Studio 2017. The provider dropdown in the Advanced tab is missing Microsoft.Ace.OLEDB.16.0 provider, and its not feasible to install Microsoft.Ace.OLEDB.12.0. Office 2016 is already installed on all computers that will be using this app.

I can connect to a database by manually creating an OleDbConnection secifying the Microsoft.Ace.OLEDB.16.0 provider.

My question is, is it possible to add that provider to the connection wizard options?

Doug Busby
  • 11
  • 1
  • 2
  • You probably want to select "Microsoft Access Database File" > Continue > Advanced button. The Provider property lets you pick a specific version of the provider. I only see Jet 4.0 and ACE 12.0 but don't have Office 2016 installed. – Hans Passant Aug 02 '18 at 13:58
  • That's what I'm doing and it shows jet 4 and oledb 12, but no 16. I don't have 12 installed and it wouldn't work in my environment anyway because office 16 is installed on all boxes. – Doug Busby Aug 02 '18 at 14:03
  • It does not matter at all what is installed on other machines, focus on yours. One basic reason I can think of is that you have the 64-bit version of Office 2016 installed. VS is a 32-bit program so can only use 32-bit providers. Consider to likewise install the 32-bit version of Office. But it is risky, you do have to test your code on a machine with the 64-bit version. – Hans Passant Aug 02 '18 at 14:18
  • That very well may be it. Office is x64 and I have to compile using x64 processor for the manual connections to work. If you make this an answer I will accept it. – Doug Busby Aug 02 '18 at 14:20
  • Worth a try: https://www.microsoft.com/en-us/download/details.aspx?id=54920 – Hans Passant Aug 02 '18 at 14:24
  • Unfortunately that won't work. I get an error "You cannot install the 32-bit version of Microsoft Access Database Engine 2016 because you currently have 64-bit office products installed". Uninstalling Office 2016 x64 and installing Office 2016 x86 isn't an option unfortunately, which has caused all kinds of headaches. I appreciate the assistance and will probably just create the dataset on an old box, migrate it over, and modify it on my dev box. – Doug Busby Aug 02 '18 at 15:03

2 Answers2

1

There are such kind of problems in VS 2017.

Check this also.
Can't find ADO.net Entity Data Model template in VS2017

Its more worth to use VS 2015 in your project.

Dhananjaya
  • 372
  • 1
  • 6
  • 22
  • Unfortunately that's not an option. My employer already bought 2017 professional so I'm locked into that now. – Doug Busby Aug 02 '18 at 13:58
1

I'll add this for anyone else who's in my situation. As it stands, it's impossible to connect to an Access database thought the database connection wizard of you have office x64 installed. Office blocks the install of the 32-bit Access drivers and prompts you to uninstall office and reinstall 32-bit.

Doug Busby
  • 11
  • 1
  • 2