I ran into this error today when trying to run some old code that I’d written that hasn’t been touched in years. Basically, the program inserts metadata about music files from the file system into an Access database. The issue in this case is a 32-bit vs. 64-bit one.
The solution was to set my program to compile to AnyCPU and was unable to call the 32-bit code needed to connect to Access. I specifically sent the program to compile to x86 and resolved the issue.