Linux 中的 ODBC 和 JET 数据库
如何在 Linux 上为 JET 数据库设置 ODBC?
我已经尝试过 UNIXOdbc 和 iODBC 但我似乎无法让它工作......
有人可以提供一些指导吗?
编辑
我必须打开 *.mdb 文件(本机 Access 数据库格式)并运行一些查询。在 Windows 上,我使用 Python 和库 pydobc。我也希望能够从 Linux 运行我的代码。我可能只使用 mdb-tools 来提取数据,但如果我可以直接连接到数据库,我会更喜欢它(也许我需要添加一些表并重新分发 *.mdb 文件)。
How can you setup ODBC on Linux for JET Databases?
I've tried with both UNIXOdbc and iODBC but I can't seem to get it to work...
Could somenone provide some guidance?
Edit
I must open and run some queries on *.mdb files (native Access databases' format). On windows I use Python and the library pydobc
. I would like to be able to run my code from linux too. I could propably just use mdb-tools to extract the data but I would prefer it if I could directly connect to the database (maybe I will need to add some tables and redistribute the *.mdb file).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
它是商业性的,但这应该可以满足您的需要。
http://www.easysoft.com/products/data_access/odbc -access-driver/index.html
Its commercial but this should do what you need.
http://www.easysoft.com/products/data_access/odbc-access-driver/index.html
除了 iODBC 之外,您还需要一个 ODBC 驱动程序...
其中一个 ODBC 驱动程序是 OpenLink Multi层 ODBC 到 ODBC 桥
In addition to iODBC you will need an ODBC driver too...
One such ODBC driver is the OpenLink Multi-tier ODBC to ODBC Bridge
有运气吗?如果它仍然无法工作,您是否有适合该数据库的 ODBC 驱动程序,因为 ODBC 兼容应用程序不必安装 UnixODBC 或类似的东西。所有这些通常都是在应用程序本身内部完成的,它读取连接字符串并做出正确的反应。如果它找到 DSN,则需要找到该 DSN 的条目,但如果添加 DRIVER= 并且该驱动程序是 .so 文件的路径,则它应该加载驱动程序,而无需搜索 .odbcinst.ini 或类似内容。
Any luck? In case it still does not work, do you have a proper ODBC driver for that database, because ODBC compliant applications do not have to have UnixODBC or anything like that installed. All of that is usually done inside of the application itself which reads the connection string, and reacts properly. If it finds DSN, it needs to find the entry for this DSN, but if you add DRIVER= and this driver is a path to an .so file, it should load the driver without searching for .odbcinst.ini or anything like that.