Access FoxPro .dbs Xbase databases under Linux

Q I am a recent convert to Linux and have managed to find alternatives to most of my Microsoft programs. One thing I still haven't managed to do is read or update FoxPro .dbf files. I have a legacy database system that uses them and in Windows I would connect through an ODBC connection. Is there a way to do it in Linux? I am running Ubuntu and would prefer to use Python or PHP.

A There are a few ways to access Xbase databases, as created by [the programming language] FoxPro. Rekall is probably the most complete. This is a database front-end, available in commercial and GPL variants. Access to Xbase databases is through Rekall's XBSQL library. The GPL version is available at www.rekallrevealed.org. Rekall can be scripted with Python. Another option is Knoda, from www.knoda.org. Once again, this is a database front-end that connects to various database servers. Alternatively, you could use XBSQL and the Xbase library directly to build your own PHP or Python based front-end. However, a better long-term solution may be to use Rekall or XBSQL to export all your data to a MySQL or PostgreSQL database. Both of these database servers are well supported and have a wide variety of web or GUI front-ends available, and allow command line or script access. XBSQL is available for Ubuntu through the Universe repository. Select this repository in Synaptic and install libxbsql-bin to give yourself SQL command line access to your FoxPro databases.

Back to the list