Thursday, July 2, 2009

Paradox for DOS Viewer in Ubuntu 9.04 and VMware Workstation

At the start of this project, I wanted to run Paradox for DOS 4.0 in Windows XP. I had WinXP running in VMware Workstation 6.5. For a while, my old Paradox was running, but then, I don't know, something changed, and it no longer worked. Instead, I got an "Access denied" error inside the WinXP DOS (i.e., CMD, command) window whenever I tried to run Paradox. It was probably something I could have fixed easily in the old days, but I had not devoted much time to Paradox and DOS in recent years, and the solution looked like it would take more re-learning than I cared to do. My reason for wanting to use Paradox was to convert some old files to a current format, so I could view them as needed. Getting them into a current database format (e.g., Microsoft Access) would have been good, but most of them could just be archived as PDF reports, as far as I was concerned.

I couldn't find a freeware Paradox for DOS converter, so I posted a question on the pnews.paradox-dos webpage. Rodney Wise advised me to try DOSemu. The idea here was that, instead of running Paradox in a DOS window in WinXP on Ubuntu, I would drop down to Ubuntu and run Paradox in a DOS emulator there. Before going with DOSemu, I noticed that DOSBox was the SourceForge Project of the Month for May 2009. It appeared, though, that this might mean DOSBox was a work in progress. I followed several links, but didn't get much detail, and finally I got a 404 error. So I decided to stay with Rodney's suggestion of using DOSemu. To install my DOS emulator (DOSemu) on Ubuntu 9.04 (Jaunty Jackalope), then, I proceeded as follows: 1. In Ubuntu, go to System > Administration > Synaptic Package Manager. 2. Search for dosemu. Click, mark for installation, and apply. That installs a menu pick for Applications > System Tools > DOS emulator. 3. That menu pick won't work until you enter some additional commands. The advice I got was to enter it all on one line, like this: echo 0 | sudo tee /proc/sys/vm/mmap_min_addr In case it's not clear in your font, that line begins with "echo zero," not "echo oh." But that gave me a password error. So instead, I did it in two steps: sudo -i echo 0 | tee /proc/sys/vm/mmap_min_addr 4. Now you can click on that menu pick. This gives you a window in Ubuntu entitled "DOS in a BOX." DOSemu defaulted to the following disk assignments: A: Floppy drive, if any C: A 2GB virtual drive with DOS config.sys and autoexec.bat files D: Uses /home/ray (my username) as a read-write drive E: CD/ROM drive The documentation provided some instructions to change these assignments, but I didn't need to. I could just move the old Pdx DB files I wanted to convert to that /home/ray drive in Ubuntu and tinker with them there using DOSemu. (I noticed, incidentally, that the DOSemu documentation dated from 2003 and earlier, so I did wonder if I should have been more patient in researching the DOSBox option. Basic DOS commands seemed to work normally. I created and deleted a couple of directories and then used Ubuntu's File Browser (Nautilus) to move some Paradox data files into a new folder called D:\PDXDB. I also copied over my Paradox program files to a folder called D:\PARADOX. But while DOSemu seemed to run fine, I was not able to get Paradox to run inside it. At best, my attempts to run Paradox within DOSemu resulted in an error message about PDOXUSRS.NET. This seemed to be a problem of Paradox rather than DOSemu. When I tried running Paradox from a batch file with additional commands I had used previously, I got an "Unexpected Condition" error. I had seen the latter error many times before, but it had been quite a while, and I could not remember how to get around it. Ultimately, instead of troubleshooting that, I hunted around for freeware alternatives. Unfortunately, I didn't find many. First, I downloaded and used a 30-day trial shareware utility, Paradox Viewer from BrotherSoft - Scalabium (about $15 if you buy it). I had large memo fields in the old Paradox tables, so I saved them in Microsoft Access format. (Other options: comma-delimited, plain text, HTML, XML, Excel, SPSS, SQL, ADO, and Lotus 1-2-3.) For the old data that definitely needed to be archived as PDFs rather than kept in a database, I exported from Access to .rtf format, cleaned them up, and printed them as PDFs. Note: 100 records maximum export per table in the free trial -- and unlike some of the other products mentioned here, there's no pop-up dialog to say so. You just lose that extra data in records 101+. For the most part, Paradox Viewer was a professional, easy-to-use program. One problem I had was that it would not export fields to Access if the fieldname had a period or other punctuation in it; but it would export them to Excel. (In other words, it's a viewer, not an editor; it wouldn't let me change field names.) Another problem was that it would not read BLOB (Binary Large OBject) fields. Maybe if they had been all text, it would have been fine, but they were from WordPerfect for DOS 6.0 -- that is, they were WYSIWYG. So a Paradox-to-text converter wasn't the answer either: the graphics would be lost in the conversion to plain text. BrotherSoft also offered a direct Paradox-to-Access converter, but it seemed safe to assume that it would be using their same technology to read BLOB fields. I tried another one: ABC Amber Paradox Converter. The trial version on this one would only let me export 10 records at a time. Also, batch mode was not available in the trial. Worse, when uninstalling it, I ran into a problem that is apparently with the Wise Uninstall program, not with Amber: I got a "Could not open INSTALL.LOG file." The solution was, I hoped, to reinstall the program, just like before, and then try again to uninstall it, but that didn't do it. So I wouldn't advise trying this product at this point. I tried Data Import & Export 2.0, but it wasn't able to do anything with Paradox. I don't know why it came up in my Google search. DTM Data Editor, too, was shareware. I decided not to try installing to see what its demo version would let me do. Next, I tried Paradox dBase Viewer, but it said "Unsupported database file." It did recognize that my files were Paradox 4.0 tables, but it could not read some of them. (For the ones that it could read, it worked well. See below.) Paradox Converter would only let me export 50 records without spending $60 for the full version; it also wouldn't export to Access, so I would have had to convert DB to DBF and then import from there into Access. I did have WordPerfect Office X4, standard version, but that didn't include Paradox, and trying to open DB files in WordPerfect X4 gave me an "invalid file name" error. Upgrading to the professional version of WordPerfect Office X4 would have cost me $260. I wondered whether an old copy of Paradox 7, which I could get for $14 (including shipping) at, would be able to read those old BLOB fields. I dug around for a while but found no answers on that, so I posted a question on it. After three or four days, my post still had no reply (though the website said lots of people had viewed it), so I suspected there might not be too many people who knew the answer for sure. So I went ahead and bought a copy of Corel Wordperfect Office 7 Professional, which apparently did include Paradox 7. While Office 7 Professional was installing, it showed me a series of promotional blurbs, including one that did confirm that Paradox 7 was part of the package. But Paradox 7 didn't install. Everything else did -- WordPerfect 7, Quattro Pro 7, etc. -- but not Paradox 7. I did a Google search and saw that a number of others had had some kind of problem along these lines. One suggestion was to right-click on the SETUP.EXE file and choose Win95 compatibility mode, but this seems to have been for Windows NT or Windows 2000 machines. Another possibility was to try to run Paradox 7 in compatibility mode, which involved right-clicking on the program icon under the WinXP Start menu and choosing Properties and then the Compatibility tab. Paradox 7 apparently needed Windows 95 compatibility. This was perhaps a step to take later, but Paradox 7 was not even installed yet, and I didn't know how to make the setup (installation) program run in Win95 mode.
About this time, I received another copy of Corel WordPerfect Office 7 Professional, which seemed to suggest that I had ordered two copies instead of one. Indeed I had, but I thought I had asked to cancel the first order. Anyway, this one was different from the first one in several ways: the seller had kindly included the serial number, which was requested but not required during the installation process; s/he had included the actual printed manuals; and the CDs were labeled differently. In the first copy I received, the CDs were labeled "Applications disc," "Corel A to Z," and "Library disc." In the second copy, the CDs were labeled simply Disc 1, Disc 2, and Disc 3. More about this in a minute.
Someone suggested installing the Paradox 7 Runtime first, and then install Paradox 7. Apparently the Runtime version was originally part of Borland (not Corel) Paradox 7 Client/Server and could also be bought separately. It seems to have come in 16- and 32-bit versions. At this point, though, it seemed to be hard to find. After digging around, I found something called the Rough Enough software system, which claimed to include the Paradox 7 runtime. I downloaded and unzipped it, renamed the resulting folder, and discovered that the installer would only run if I left that folder with its original name. But even then, I couldn't get the program to install.
Using a different approach, I tried the freeware Paradox dBase Access Reader 2.1.0. Or at least that's the name that appears when you hit Help > About in the program itself; but a search turns up no such beast, nor does there appear to be anything out there known as Sportamok Software, and a visit to (which is also named in Help > About) yields a webpage belonging to some kind of sports statistics organization that seems to have no information on any such program.. Yet here it is nonetheless. And you can have a copy if you search for Paradox dBase Viewer 2.1.0 (not exactly what the program calls itself, but what everyone seems to call it).
As Derek Duke kindly pointed out to me, this Paradox dBase Viewer (PDV) program will cough up the contents of a Paradox 4.0 for DOS database if you take the following steps:
  1. Start PDV. In its General tab, it will show a list of DB files in the indicated folder.
  2. Select one of those files and switch to the Data tab.
  3. Right-click on the column titles to sort, exclude a column from viewing, etc.
  4. Highlight the records you want. If you want to highlight them all, Ctrl-A is an easy way.
  5. There are two ways to get the data into another program. You can copy (Ctrl-C) and paste (Ctrl-V) what you have highlighted, or you can click on the program's HTML File button and export to HTML, Text, Excel, or XML files or to the Clipboard. Copy and paste works with BLOB files (at least with text BLOBs), even though the contents of the BLOB field are not themselves visible onscreen from inside Paradox dBase Viewer.
Consistent with Derek's tip, I exported to HTML and then opened the HTML file in Microsoft Word 2003. Word recognized the data as a table, so I did a Convert to Text (telling it to insert paragraph breaks between data fields). I cleaned it up some more, inserted page breaks, printed it to PDF, and broke up the PDF into individual files. And there, I had PDF files resembling my original data.



I'm Mike Shkolnik, an author for Paradox Viewer from Scalabium Software.

I only wanted to add a few words about your comments:
1. in registered version our viewer allow to extract the text from BLOB with WordPerfect content

2. export to MS Access work if field name contain the period char. Maybe your field(s) have some other "system" character?

Anyway thanks to you for a kind words.


I work with paradox DBs at work. The vendor wrote in pascal and I haven't devoted the time to grasp pascal yet. I'm stuck in the realm of c-like languages.
luckily I largely only need read-only access - I typically export the data to csv or sqlite, sometimes to html or flat sql.

There's a c library and application available for this today which is critical to my work. Usually for scripted or one-off conversions I use pxview.

Pxview and pxlib are very easy to compile on linux. With some blood and sweat I was able to get them workibg on windows, which is also very helpful in a nasty office environment.

For those readers inclined to casual hacking, go search for pxlib and you will have another tool to do the sorts of tricks described in the post -- natively and everything.


Another gotcha was that one of the px dbs I work with contains a field called "LIMIT". This has caused me grief.
I renamed the field with a hex editor (just changed to "lymit", although amusingly the field names looked null-terminated, like c-strings, so I could probably have given the name an arbitrary length)

sed would possibly serve also, in a batchy environment.

Just something to look out for.


Here are some links to pxlib.


A more recent post provides some other ways of getting data out of old Paradox tables.