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.

2 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.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s