0

Thanks first for reading this. Yesterday I suddenly got above error without having changed a single line of code in my Program itself. Fortunately I could easily solve it by querying stackoverflow. I did install the Microsoft Access Database Engine 2010 Redistributable as recommended here and it worked.

BUT: Does anybody know what this fix does behind the scenes and an alternative way how this fix could be achieved kind of "manually"?

Why I am asking: I am working in a big Company with an IT Department rolling out software centrally. I have an exception for my little Program but apart from that I can't and must not advise any user to install this additional software. Anyway they wouldn't even be able to do so. So I must find an alternative way.

Some more details: We are having Windows 7, Office 2010 and are now moving step-by-step to Windows 10, Office 2016. Some software installations (centrally by IT) to prepare this step must have been the reason why my Program suddenly did through this error above. I am developing my Program under Visual Studio Professional 2012 and I am (still) on Windows 7 myself. In my Reference Manager I have ticked:

  • Microsoft ADO Ext. 2.8 for DDL and Security
  • Microsoft OLE DB Service Component 1.0 Type Library

Any help is highly appreciated. Thanks and have a good weekend.

YowE3K
  • 23,852
  • 7
  • 26
  • 40
finny
  • 21
  • 7
  • So you building this app on a Win 7 machine with VS 2012. Are you saying that you previously had Office 2010 installed but now have Office 2016? If not, did your machine change and how? – jmcilhinney Jul 14 '17 at 06:12
  • I am building this app on Win7 and VS2012. I have still not been migrated to Office 2010. My machine obviously did change as the Company prepares for the migration to 2016. Unfortunately this is done centrally and I can not reproduce what the step-by-step changes may be. Do you probably know how I would be able to reproduce what has changed software whise? – finny Jul 14 '17 at 06:17
  • You say "I have still not been migrated to Office 2010". Is that a typo? Do you mean that you haven't migrated from Office 2010 to Office 2016? – jmcilhinney Jul 14 '17 at 06:24
  • Sorry, yes, it is a typo. I still have Office2010. I have not yet been migrated to 2016. But the Company obviously is distributing the "first bits" before fully migrating. – finny Jul 14 '17 at 06:27
  • If your company migrates from a 32-bit version of Office to a 64-bit version, the Data connectivity drivers will change. –  Jul 14 '17 at 08:33
  • So if your software is set to target x86 CPU's and the x64 Version of Office is installed, the data connectivity drivers wont work and will give the error above. The reverse is also true. –  Jul 14 '17 at 08:41
  • Thanks for your reply. I have just checked with my colleague who has been migrated already. So: We are migrating from Office 2010 32-bit to Office 2016 32-bit. Not 64-bit. My Target CPU in Visual Studio is set to AnyCPU and has not been changed. – finny Jul 14 '17 at 08:54
  • Also, make sure the office package actually includes ACCESS as that is the important component. If the the package doesnt include Access, that could also be the source of the problem. –  Jul 14 '17 at 08:56
  • Yes, the future installation will include Access, too. My problem is understanding what made the above error message popping up, even though I have not changed a single line of code. The Project References have also not changed in Visual Studio. The fix (the MS DB Engine Redistributable) is there and works but I can not roll that out as my environment does not allow that. What could I do in my code to catch this error and what would I need to implement instead, if the connection string does not work as expected. Any ideas? – finny Jul 14 '17 at 09:05
  • Try changing your target CPU to x86. Im not sure if microsoft changed the connectivity driver between the 2010 and 2016 versions like they did when the ACE driver replaced the JET driver in 2007. –  Jul 14 '17 at 09:13
  • I think thats a good point. How could I find out if microsoft changed the connectivity driver between the 2010 and 2016 versions? I have already changed the target CPU yesterday directly after I got the error message. Without success. Same error came up. – finny Jul 14 '17 at 10:16
  • The easiest test would be to remove the 2010 database Engine and install the 2016 version. If it works then its not the driver. If it does'nt, then it is the driver –  Jul 14 '17 at 12:16
  • Thanks for your help and advice. I will test on Monday when I am back at work. Have a good weekend. – finny Jul 14 '17 at 16:30

1 Answers1

1

From what I could find on the internet, it seems there has been a change in the version number of the ACE driver in the office 2013 / 2016 versions. The ACE version will be either 15.0 for 2013 or 16.0 for 2016. Try changing you connection string to accommodate this change and see if it solves the problem.