Creation for x86 and "Any processor"

I am trying to use the Microsoft.Jet.OLEDB driver to connect to the access database from my C # application. When I try to open a connection, I get an error: "Microsoft.Jet.OLEDB.4.0 provider is not registered on the local computer." This is because the driver is only supported on 32-bit machines.

My solution was to modify the platform target referencing x86. If I try to change all my projects on x86, I get serious build problems, so I leave them to "Any processor"

The problem is that when I start in VS, it tells me: โ€œFailed to load the file or assemblyโ€ MyProject, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null "or one of its dependencies. To load the program with the wrong format. "

I tried every configuration that I can think of, and I just can't get it to work. Any tips?

+3
source share
2 answers

You need to switch everything to x86. As you discovered, there is no x64 driver for Access.

, x64, x86. , : x64- x86 - ?

, Access Database Engine x64 MS. , . MSDN.

+6

32-, Jet. (Edit: , ).

- , , 64- 32-. , , , .

.

+3

Source: https://habr.com/ru/post/1772199/


All Articles