开发者

Access 2010 runtime causes .NET OleDbConnection.Open() to fail with Access97 MDB file

I maintain a .NET 3.5 application (using Visual Studio 2008) that makes a call to OleDbConnection.Open() w开发者_如何转开发ith a connection string provider of Microsoft.ACE.OLEDB.12 and an MDB file with format Access97. This application has a requirement that the Access 2007 Runtime be installed.

The call to OleDbConnection.Open() succeeds if the Office 2007 Runtime is installed and the Access 2010 Runtime is NOT installed. Once the Access 2010 Runtime is installed (for example, the user installs Office 2010), the call fails. The error message is "Cannot open a database created with a previous version of your application."

  1. From reading other threads on StackOverflow and elsewhere, it appears that Access 2010 does not support reading or converting Access97 MDB files. Is there no way call the functionality of the Office 2007 Runtime once the Access 2010 Runtime has been installed (wthout uninstalling Access 2010).

  2. Another approach would be to programmatically convert from Access97 MDB to a later format that can be read by Access 2010. I've tried calling: Microsoft.Office.Interop.Access.Application.ConvertAccessProject() implemented in Microsoft Access 14.0 Object Library; with various versions of Access installed, but I get a COM error (80080005 server execution failed).

  3. I've also tried launching msaccess.exe within my app with the /Convert flag. That causes Access 2000 to open but with an error message ("Microsoft Access failed to convert...").

  4. By the way, the MDB databases do not contain anything "complicated," no relational data, no macros, no security, etc., just flat records.

  5. I've found some useful programming tips on Allen Browne's site (http://allenbrowne.com/ser-48.html "Converting from Access97" and http://allenbrowne.com/Access2007.html "Converting to Access 2007") but nothing that has panned out.

Any thoughts about the best way to solve this?


I would vote for converting from A97 format to Jet 4, which is going to be widely supported for a very long time (even though the ACE has been out since 2007).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜