Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I got a error when trying to oepn a database(.mdb) file througu using ADOclass.

The error message is mentioned below "cannot open a database created with a previous version of your application"

Could you please let me know how to solve the problem.

What I have tried:

CDAO m_pReportDB;

sRepDbPath = "Provider=Microsoft.ACE.OLEDB.12.0; " + CString("Data Source=") + sRepDbPath;

if (m_pReportDB.Open(sRepDbPath))
Posted
Updated 26-May-16 23:02pm
v3

1 solution

Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.

"i modifed the question"

Then it's almost certainly that your DB was created in an earlier version of the ACE or JET DB engine - some versions cannot be opened by later engines.
Check the DB, and (after backing it up) convert it to the latest version using Access or similar.
 
Share this answer
 
v2
Comments
Gayle123 27-May-16 5:02am    
i modifed the question
OriginalGriff 27-May-16 5:10am    
Answer updated.

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