I have 32-bit Office installed together with 32-bit AccessDatabaseEngine on a laptop with 64-bit Windows 10.
With 32-bit Office goes 32-bit ACE although Office does not use ACE (but VBA can do) and (Microsoft disallows 32- 64-bit ACE 12.0 to coexist on the same computer).
Using an identical connection string and sql statement, I am able to use ADODB successfully but a C# COM server is giving me this error:
The 'Provider=Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
I am also able to Import Data from xlsx sources in SQL Server Management Studio.
It appears that the C# Com server is looking for the 64-bit version. I have specified x86 as the target platform for the C# project.
Any hints on how to overcome the error with the C# COM server? Why does C# default to using 64-bit ACE 12.0 (ADODB & SSMS do not)? Is there a way of coercing the use of 32-bit ACE in the C# project - I've already specified x86 as the target platform?
Thanks.