Getting Data Out of Old Paradox Database Tables

I had some old Paradox tables. I believe the version I had used to create those tables was Paradox 4.0 for DOS. At times, it had been possible to run a DOS-based version of Paradox on Windows XP in Windows Virtual Machine and also (I think), five years earlier, in VMware on Ubuntu. But it had been more than ten years since I had seriously used PDOX for DOS; at this writing it was not running for me at all; and it had been more than ten years since I had used its commands often enough to remember them. So I went in search of an alternate way of getting data out of those old Paradox tables.

In Paradox for DOS, I had constructed tables with various kinds of fields. This had generated both .DB and .MB files. My impression was that Paradox used .MB files to hold the contents of a table’s largest fields. Fields up to 240 (?) characters would be stored in .DB files; the contents of longer fields would go into companion .MB files. So, for example, if I created TABLE.DB, and structured it to include a field of 270 characters, I would wind up with TABLE.DB and also TABLE.MB. I believe it would be possible to open TABLE.DB even if TABLE.MB got corrupted (which often happened with my Paradox tables) or deleted; but without TABLE.DB, I believe TABLE.MB would be useless.

There was also the option of creating Binary Large Objects (BLOb) fields. A single BLOb cell could contain an entire document, picture, or audio or video recording. Paradox would store the contents of BLOb fields in .MB files too. So, for example, if I stored a WordPerfect for DOS document in a BLOb cell, I could open it from within Paradox if I had that version of WordPerfect installed on my computer. Otherwise, I was not sure if it was even possible to export that document. I believe the contents of my BLOb fields were mostly lost over the years, as DOS gave way (on my machine) to OS/2 and then Windows in the 1990s.

I had used Paradox dBase Viewer (a/k/a Paradox dBase Access Reader) in Windows 7 to export the contents of Paradox .DB tables to Excel spreadsheets. As I recalled, this viewer was able to export in spreadsheet and also in HTML format. I had not experimented with the latter. I was not certain, at this writing, whether it would have enabled the results I achieved using another approach. This viewer was no longer working, at this writing, possibly because I had lately installed other programs that drew upon the same underlying Borland or Corel technology in some incompatible way. (Borland developed Paradox in the early days and later licensed it to Corel.)

That possibility of incompatibility arose when I installed Paradox Data Editor 3.2. I ran that program, and then tried to open a DB file in Paradox 11. The latter gave me a sequence of error messages:

Private directory is invalid or undefined. Using temporary directory instead.

and then

Could not initialize BDE.:
Insufficient memory for this operation.

The latter error vanished as soon as I closed Paradox Data Editor and tried again to open the file in Paradox. Possibly the former error was just due to a problem with the particular file.

Paradox 11 was able to detect the .MB contents of an old Paradox 4 table, in a way that I think Paradox dBase Viewer (above) had not been able to do. But for some reason, I could not get Paradox 11 to export the full contents of that large table. Exports to Paradox, dBase, and other formats yielded no joy. The closest I got was when I tried exporting to WordPerfect. Paradox 11 indicated that it was producing a WordPerfect document; it got up to somewhere around 5,000 pages; and then it crashed.

What did work was to use Paradox Data Editor (above) and to export to XML. I double-clicked on the resulting XML table. It opened in Notepad. I was able to paste from there directly to Excel. Alternately, I could paste into Microsoft Word, and then optionally copy from Word to Excel. The latter route seemed more inclined to produce an error: “Microsoft Excel cannot paste the data,” possibly due to too many programs making too many demands on my system. The Notepad-to-Excel route worked with XML files of around 50MB. For larger files, I had to open the XML file directly from within Excel.

With one import effort along those lines, after hours of correcting errors caused by unprintable characters found in the data table being imported, I discovered that Excel would gladly import almost anything in a file with a TXT extension. It was being so picky about weird characters just because it was checking the XML file (before I changed its extension) to make sure all characters were proper XML. In other words, it was much easier to import after changing the extension of the XML file exported from Paradox Data Editor to make it a TXT file instead.

In Excel, these steps gave me one row per database record, one field per row. So, for example, a record that had contained separate fields for Entry Number and for Date now gave me an Excel cell that looked like this:

<ROW Entry="130522" Date="19990527"/>

That example is abbreviated for purposes of explanation. The actual database records were somewhat voluminous. Use of Excel’s LEN function revealed that my imports into Excel had given me cells containing as many as 11,635 characters. In other words, it did appear that this process had yielded the contents, not only of the .DB file, but also of the adjoined .MB file.

I found that the text from the Paradox table needed some cleaning up. This was feasible at any point — in Notepad, Word, or Excel, though in Word it was necessary to turn off smart quotes before replacing single and double quotes. I did global search-and-replace operations for the following items:

  • &apos; = ‘ (apostrophe)
  • &amp; = &
  • &quot; = “
  • &gt; = >
  • &lt; = <

I also replaced all instances of HTML punctuation special characters which I found by searching for an ampersand and a pound sign (which I have to spell out, here, because WordPress cannot tolerate them in text). Examples:



This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

5 Responses to Getting Data Out of Old Paradox Database Tables

  1. Mark Treadgold says:

    I always found that exporting the files from within Paradox to a comma delimited text file worked.
    I then exited from Paradox and imported them into Excel and one could then save as a xl or xls file.
    But now that Paradox wont run under windows 7 I am in search of a machine running XP so I can start up Paradox and get the data I need out of the files.

  2. membakut says:

    Hi All,
    Paradox Runtime 11 can be used to view Paradox database in Windows XP, 7 and 10.
    C# can extract data and PHP can extract pictures from Paradox database.
    Happy so share codes if interested.

    • Ray Woodcock says:

      I was thinking of learning Perl for this purpose, among others. Any idea if it, too, would be able to extract data from a Paradox database?

      • membakut says:

        Hi Ray,
        I don’t know Perl, but have 3 options below.

        1st Option.
        PHP for Windows, can extract data and pictures from Paradox database.
        To be exact, only this version 1.6.6a can do it.
        ApacheFriends XAMPP (basic package) version 1.6.6a
        It is contributed by some good people.

        Please install it to your Windows.
        Look for this folder.
        Has php codes on how to extract text and pictures from Paradox.
        You have to edit the codes to suit your Paradox db name & fieldnames first.
        Confirmed working! Extracted thousand of records and pictures from two legacy Paradox databases.

        2nd Option.
        Microsoft Visual Studio 2013 Express for Desktop.
        Please use C# language.

        Snippet of example. (Will give complete codes if want to write in c#, now is night time, getting late)
        Conn = new OleDbConnection();
        string conn = “Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\Paradox; Extended Properties=Paradox 7.x;”;
        Conn.ConnectionString = conn;
        cmd = new OleDbCommand();
        cmd.CommandText = “select * from movies”;
        cmd.Connection = Conn;
        dr = cmd.ExecuteReader();
        string v_Fullname = dr[“fullname”].ToString()

        Note 1:
        Please install Paradox runtime 11 first. (PDXRUNHF1.exe) (Provided by the company before cease operation)
        Because .Net use this as driver to access Paradox.
        Confirmed working! extracted thousand of records from Paradox.

        Note 2:
        Extraction program can only be written in Windows 7 and above.
        But the program can be run in WIndows Xp and above if needed.

        Bad news:
        Afraid this 2nd option can only extract data from Paradox. But not pictures.
        Please use 1st option to get pictures out.

        3rd Options.
        If just want to see Paradox data, no editing, no extraction.
        just install paradox runtime 10 or 11. (PDXRUNHF1.exe)
        when done: open the .fsl and .db in this order.
        And you can see the paradox data with pictures. (View only)

        Thank you, good night.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.