Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have no experience with Foxbase whatsoever and I'm used to working with MySQL via phpmyadmin or interfaces like that.

My company has a third party database we're trying to move away from, but we have no support from the company. The database is on our servers, but in a foxbase format. What kind tools do I need to convert these into other formats, or is there any type of admin UI I can tell them to use to export to csv or anything like that?

Basically I'm asking how to export the foxbase tables to csv. Sorry if this question isn't clear or you need more information. I will edit with anything else you need.

share|improve this question
1  
en.wikipedia.org/wiki/Foxbase –  RKS Oct 31 '13 at 23:10
add comment

1 Answer

There are a few ways that you can do this, the easiest all involve using ODBC drivers for FoxPro and/or Dbase (depending on the version of the dbf and the specific driver).

Depending on the number of rows in the tables you could just open up the data in Excel through an ODBC connection and then export the data to CSV. You can also write up export code in any language where you can open the data through an ODBC connection.

Another option is to open the dbf in a slightly newer version of FoxPro (6.0 or higher should do) where you can use ANSI SQL commands to select the data into temp tables or cursors and then export it. You can do this because FoxPro is not just a database engine but also provides a REPL (like the Ruby irb) so you can perform selects and then export to CSV from within the FoxPro shell.

There is also this answer from StackOverflow that details a Python module that may also do what you need.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.