Run-time error 3041: Cannot open database with a previous version of your application - August 7, 2008
Recently while helping a client who was doing some software testing of CD-ROM software, a problem was discovered where the application would run on some Windows boxes but not on others. The program gave the error “Run-time error 3041: Cannot open database with a previous version of your application”. This error is usually seen with Access databases, so we started there. The program did in fact have an “MDB” file, so the problem was that the MDB database file was created with some version of Access that was not being handled for some reason.
The solution to this problem was found in the Windows registry. Like most up-to-date Windows XP boxes, this one had the Jet 4 database engine. However, there were missing entries that tell Jet 4 how to handle older databases that would have previously been handled by Jet 3 or Jet 2. To fix this, I did the following:
1) Open the registry: Start->run->regedit
2) Create a key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines and name it “Jet 2.x”.
3) Under the “Jet 2.x” key, create a string value called “win32″ and modify it to contain “C:\WINDOWS\System32\Msrd2×40.dll” (assuming your WINDOWS directory is C:\WINDOWS)
4) Create a key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\ISAM Formats and name it “Jet 2.x”.
5) Under this “Jet 2.x” key, create a string value called “Engine” and modify it to contain “Jet 2.x”.
6) Register the DLL file above and you’re all set. Start->run->Regsvr32.exe C:\WINDOWS\System32\Msrd2×40.dll
These steps tell Jet 4 how to handle Jet 2 databases. You can repeat the steps for Jet 3 databases as well by just using “3″ instead of “2″ in the appropriate places. Also note the file name of the DLL would be changed to Msrd3×40.dll. This fix was applied to machines running Windows XP Pro, Windows XP Home and Windows Vista Ultimate.