Coldfusion: DSN – Access 2007 extension .accdb

Published by

Posted on April 25, 2009

Wow ,this by far is the bet article I have came across

Possible error : [Microsoft][ODBC Microsoft Access Driver] Could not find file ‘(unknown)’.

With Microsoft Office 2007, Microsoft strikes again and implements a new format for their Access database standard. I do not recommend using Microsoft Access databases for production applications. In fact, I believe you will pay, sooner or later, for adopting such a practice. Nevertheless, it is useful for testing or development at times, and more importantly, you may be in a situation like me, where there are databases that you do not “own” or control but your ColdFusion apps must use them.

That said, please note that the drivers that come with CF8 do not support Access 2007. This is mentioned in the ColdFusion 8 Release Notes under #69495. The solution is nicely described right in the release notes. Download and install the Data Connectivity Components for Office 2007, set up a Windows ODBC connection, and use ColdFusion’s ODBC socket driver to connect to the Windows ODBC connection. A bit irritating that all of this has to be done, but like I said at the outset, these irritants are the price you pay, among other things, when using Access databases.

Another point to note! You thought you were done, but no, Microsoft has more joy in store for some of us.  The Office 2007 drivers do not support Windows 2000. So if your server is still sitting on a Windows 2000 installation, the final word is either (a) No Access 2007 for you, or (b) Time to upgrade to Windows 2003 SP1 or later.


esasy work around from O?uz

You can use JDBC to connect Access 2007.

– Select “other” for DSN in CF admin,
– JDBC URL: jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=c:/od/test.accdb;”;
– Driver Class: sun.jdbc.odbc.JdbcOdbcDriver

But this config does not support Unicode as expected