首先,对不起我的英语。
我正在使用 PHP 和 dbase 数据库进行开发。通常我在 Windows 机器上这样做,但有时我必须在 Ubuntu 上开发。问题是,我找不到在 Ubuntu 上创建 odbc 数据源的方法,与 数据库。
那么,有什么建议吗?这可能吗?
我不想直接从 .dbf 文件中获取数据,我想连接到 odbc dsn。
感谢您的时间。
最佳答案
一直到底部manpage for xbase作者写道:
How is this DBD::XBase related to DBD::ODBC? DBD::XBase reads the dbf files directly, using the (included) XBase.pm module. So it will run on any platform with reasonable new perl. With DBD::ODBC, you need an ODBC server, or some program, that DBD::ODBC could talk to. Many proprietary software can serve as ODBC source for dbf files, it just doesn't seem to run on Un*x systems.
由于 dBase 在很大程度上是一个遗留系统,因此任何人都不太可能投入大量精力来编写或保持 odbc 驱动程序是最新的。
如果您现有的 dBase 代码的复杂性允许,也许您可以开始迁移到一些基于 SQL 的 DBMS。从 Microsoft SQL Server 到 SQLlite 的任何驱动程序都更容易找到。
如果您现有的代码库或时间表不允许迁移,那么通过 Web 服务进行连接可能会打开一个 Ubuntu 窗口。
关于ubuntu - 在 Ubuntu 12 上创建 dbase ODBC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16041915/