Click here to Skip to main content
14,735,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i installed Microsoft access database engine 2007 & 2010 & 2016 ...(all at same time)
when i connect to simple database , it's connect successfully..
but when i connect to database with Calculated columns , error show "unrecognized database format"
so how can i solve it
>>> I use access 2019
>>> and visual studio enterprise 2015
i will appreciate any help

What I have tried:

Microsoft access database engine 2007 & 2010 & 2016
create multiple databases
Updated 3-Sep-20 9:33am
CHill60 3-Sep-20 6:55am
Share the code you are using to connect

At a guess, it's because you are opening a 2016 Access DB file using the 2007 database engine: it's a later version of the file, and the earlier engine can't understand it.
Anmar Sattar 3-Sep-20 11:47am
thanks sir
when i uninstall access engine 2007 ,error show "the microsoft.ace.oledb.12.0 provider is not registered on the local machine"
but 2010 and 2016 are still installed
OriginalGriff 3-Sep-20 12:01pm
That's because your connection stirn git directly referencing the 2007 version ... which is the reason you are getting this problem.
Anmar Sattar 3-Sep-20 13:45pm
when i press add new connection and choose my database >>advanced
connection string is "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=mydatabase.accdb"
so how can change the engine version
Please, follow the steps provided here: Connect to data in an Access database (Windows Forms) - Visual Studio 2015 | Microsoft Docs[^]

As you provided less than minimum information required to answer the question, we can't help you more.
Anmar Sattar 3-Sep-20 11:41am
thanks for reply.
i know how to add data source but it doesn't work with database which contain calculated columns (in tables)..
what information do you need to know ?
Maciej Los 3-Sep-20 12:05pm
Well... Looking at your error message, you can't connect to MS Access database, but you did NOT provide information:
1) how do you create connection in code (or mannually)...
2) what OS version: 32 or 64 bit?
3) what formula you used in calculated column?
Anmar Sattar 3-Sep-20 13:39pm
1) Manually by "add data source",,,,,(in code work successfully)
2)64 bit
Maciej Los 3-Sep-20 13:59pm
"(in code work successfully)" - i doubt.
You mentioned in the comment to the OriginalGriff's answer:
"connection string is "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=mydatabase.accdb""
A proper connection string is:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccessFile.accdb;Persist Security Info=False;
Note: that your connection string does not contain path to the database.
Anmar Sattar 3-Sep-20 14:28pm
sorry sir
but my point is "Provider=Microsoft.ACE.OLEDB.12.0;Data"
when i choose file , the explore add full path automatically
my problem with engine and database so i ignored the full path here

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900