954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Visual C++ and Access 97 / 2002 problem

Hi

I have a C++ dll which was designed to handle an Access 97 database using dao classes. I now need to convert this to Access 2000 / 2002, but when I run it, I get 'database format not recognised' errors. Presumably, I need to recompile with different settings somewhere. Unfortunately what little C++ skills I had have long since vanished.

Any help would be greatly appreciated.

Thanks in advance

kavsak

kavsak
Newbie Poster
4 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

what dao classes are you using -- Microsoft MFC classes, some classes that you wrote, or something else? If something else then post a link to them.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

MFC - its been fine for the last 8 years. I have since found that C++ 6.0 uses dao 3.5 by default. THere is a line of code 'AfxGetModuleState()->m_dwVersion = 0x0601;' which apparently should be inserted before a database call to force the use of dao 3.6 but I cannot make it work. I have no problems in converting and reading the databases in VB, but VB is not an option for the dll due to speed / code complexity considerations.

K

kavsak
Newbie Poster
4 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

Problem solved. I was putting the recompiled dll in the app folder instead of system32, where it should have been.

Thanks AD for even thinking about it.

K

kavsak
Newbie Poster
4 posts since Aug 2005
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You