I
I
Ingvar Von Bjork2016-12-21 21:15:46
C++ / C#
Ingvar Von Bjork, 2016-12-21 21:15:46

How to fix errors when connecting to *.mdb?

The dataGridView component lies on the form, using the "Data Source Configuration Wizard" I configure the connection in the *.mdb file next to the *.exe executable. At all stages of the setup, everything goes fine, i.e. all tables, fields are read and even queries are executed, but at startup the error "The provider "Microsoft.Jet.OLEDB.4.0" is not registered on the local computer.". Google advised me to change the architecture to x86, but then a new error pops up "The string 'full*path*to*db*without*cyrillic' specifies an erroneous path. Check that the path is set correctly and there is a connection to the server where the files are located.".
When creating a connection, the Configuration Wizard also offers to copy the database to the project, and in this case it works fine, but it is implied that
Actually how to be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-12-22
@DeboshiR

Google advised me to change the architecture to x86, but then a new error pops up "The string 'full*path*to*db*without*cyrillic' specifies an erroneous path. Check that the path is set correctly and there is a connection to the server where the files are located.".

x86 is correct, for Jet 4.0, in any case, you will have to compile to x86, since its x64 version does not exist in nature, and Windows x64 has been around for a long time and therefore an x64 application will not work on them.
As for the path, it is probably set relative to the EXE, and when the architecture changes, a new folder is created and of course the MDB file is not copied there, copy it manually.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question