LAMP (PHP) accessing Access Database with ODBC with MDBTools Driver

拥有回忆 提交于 2019-12-08 18:17:30

mdbtools on sourceforge has not been updated since 2004. I see someone has put it on github and seems to have made a few small changes. The SQL support in it was never that good, it was read only and I know from experience trying it under Perl with DBD::ODBC a lot of the tests failed. I think you are going to have a hard time with it.

There are other more reliable ways to access a MS Access database from Linux but they are all to my knowledge commercial. To access a MS Access database from Linux I know of the following:

Easysoft have an ODBC-ODBC Bridge (which can be used to access a MS Access DB on a windows machine using the MS Access ODBC Driver) but it requires installing a service on the Windows machine. Easysoft also have a MS Access ODBC driver which can be used for direct access to the mdb/accdb file so long as it is visible from Linux.

There are other commercial ODBC bridges from Openlink.

If anyone happens to be looking for a hacky solution, I ended up using mdb-tools to convert the access database to csv files (1 per table), and then iterating through the csv performing a "manual" join. Not the best solution, but it ended up working for fairly small tables. Hope it helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!