Reading Paradox Files

Back in the day, Paradox was a pretty amazing database.  I recently had a reason to read some Paradox files for a friend, who had a client with a Paradox database.  They needed their data out of the database to insert into something more modern.

Googling for the file format of a Paradox DB didn't turn up much, other than this excellent document written in 1996.  It was enough to give me a good start.  I also found some sample DB files, interestingly from the Paradox documentation.

The end result was paradoxReader, which you can download here.  It handles most of the data types other than BLOBs, so far.  The documentation on how to use it is here.  It uses the visitor pattern, which means all you need to do is pass it an InputStream to a .db file, and implement a single interface which is called once per row, with the row data.

The default implementation currently outputs CSV for each table, however it wouldn't be difficult to have it output SQL or even just connect to a JDBC database and insert the data into a table.

3 Responses to "Reading Paradox Files"

  • Mats
    October 3, 2016 - 6:54 am Reply

    Hi,

    This is great!
    I recive a Exception:
    Caused by: java.lang.Exception: Unknown field type ‘4’
    at com.khubla.pdxreader.db.DBTableField.readFieldTypeAndSize(DBTableField.java:119)
    … 5 more

    I can see that FieldType 4 is missing. Do you know whay you fiealdType 4 is not implemented?

    BR
    Mats Ahlbom

    • Sergey
      February 13, 2017 - 11:36 am Reply

      Hi!

      I also use this great library to read old paradox db files and faced the same problem. But I’ve fixed this with little patch of the lib. Unknown field type ‘4’ is an integer type, there is also type ’21’ missing for timestamp fields.

      I supported two new FieldType enum values and their handling in DBTableValue and that’s worked.

  • tom@khubla.com
    December 29, 2016 - 9:09 am Reply

    Could you provide me the source database?

Leave a ReplyLeave a Reply to tom@khubla.com