Databases and data applications in MS-DOS: FoxPro

We went through a few business applications for MS-DOS, like the famous AutoCAD for industrial design and News for publishing. Today we will look at another famous application, one that perfected a new trend in the young world of computer software: data driven applications. What is the name of this application? Microsoft FoxPro.
There were quite a few database applications written before FoxPro. The earliest was dBase, a successful platform for creating data applications by Ashon-Tate. But due to fierce competition and poor judgement, the fourth version of dBase was also their last, with Microsoft steering developers to their shiny FoxPro. Purchased from Fox Software and improved overall, FoxPro offered a welcoming and recognizable text user interface, better features, support, and of course sported a world renown name by then, Microsoft. So, let’s see how business applications looked back then, shall we?
Installing FoxPro 2.6

You can grab FoxPro 2.6 from WinWorld. They have several versions listed. I had quite a few versions of FoxPro back then, the last one being FoxPro 2.6a for MS-DOS so that’s what I will use today. It is a five-disk setup, which we can easily run by calling install.exe
as seen in the screenshot above.
The setup program looks familiar, with the characteristics of all Microsoft installers for MS-DOS: text-based windowed interface with mouse support, descriptive, intuitive, spread into wizard like configuration steps, always featuring plenty of help messaging on the way:

The installer provides everything in easy-to-understand steps. It offers to reconfigure the MS-DOS environment to optimize FoxPro. Note how the sensible default is preselected:

After this configuration change, a reboot is required so it can work, after which we return to the FoxPro setup where we are required to enter our name for alleged personalization reasons:

We choose the installation folder next:

We go through a small component selection screen to customize our setup:

We adjust the PATH
environment variable to accomodate FoxPro:

And off we go:

So, what was it about?

I must say I love Microsoft’s installers for their MS-DOS applications. They are extremely helpful, follow the same design guidelines, and offer such significant help in carefully separated and worded pages. Of course, all this happens around 1993 when Microsoft was a well-established business, having enough money to invest in such details. But what about the product itself, FoxPro? Well, if we extend and play a bit with the definitions, FoxPro was a complete software development platform, having a compiler, an IDE, and able to create applications with modern text-based interfaces. In fact, a secondary step in FoxPro’s installation was made entirely in FoxPro:

If you want, you can consider any application as a database application. Installing a product from floppy disks to the hard drive requires information about where each file is stored and where it should go, which can be stored in a database, exactly what Microsoft did with FoxPro. This is the best flex you can do when advertising your application. See? The whole installer itself is built with FoxPro! You need not wonder if the application you want can be made with FoxPro: yes, it can!
After installation is done, starting FoxPro even brings us to another staple of Microsoft development tool design, the welcome page:

If you stretch your imagination, the above screenshot looks just like the start page for Visual Studio Code: it guides you on what to do. Of course, the first option is allowing you to migrate from dBase to FoxPro, automatically. If you ever worried that your old dBase applications will need you to keep dBase installed forever, fear no more. FoxPro can easily migrate these apps to itself. Automatically. We can also choose to run a sample application:

The application successfully demonstrates everything FoxPro can do: take plain data and transform it into a fully featured application, allowing users to add, edit, delete, make reports and charts, all in an easy-to-use textual interface. This is nothing to scoff at. We are in 1993. User interface was still a difficult topic, and here FoxPro offered to simplify and automate basic tasks to allow developers to create complex data-driven applications. For example, switching to the Program tab and running the Salesman program, we could edit records like this:

Of course, if you wanted to go down to the low-level bits, you could exit all that and embrace the Command Interface, allowing you to perform all data operations using SQL or FoxPro commands:

To get the above window, we could use both BROWSE
and SELECT
command:

Why two dialects? Legacy and backwards compatibility as always. SQL was itself evolving and some FoxPro commands were better suited for the kind of applications it allowed developers to build. Applications written by the way in a weird SQL/FoxPro syntax:

And here is some window definition goodness:

With the corresponding error messaging without a status bar:

Note the ALLTRIM
commands in the code above for trimming strings. And the DIMENSION
command for defining variables. Also note the standard SQL that would work even today with SELECT DISTINCT
. All that available in 1993 in FoxPro for MS-DOS.
The database itself was a DBF
file and it was revolutionary. It contained both the data and its description, unlike the usual binary types created with Pascal or C. In Pascal and C for example, the data type is described in the program itself, and the data is offloaded to an external file. FoxPro however relied fully on the DBF
file for both type description and actual data. If I got a DBF
file, it was enough to open it with FoxPro and browse the data.
Otherwise, the data was stored in binary format without using fancy data structures. There were no binary trees involved, not even for index files, which were simple repositories of tagged records. For columns with long string data, a separate memo file was used to keep the actual data, while the column itself was used as a pointer to the file. A mix of clever ideas and compromises around platform limitations.
This was FoxPro 2.6 for MS-DOS. FoxPro lasted well into the Windows era, renamed to Visual FoxPro and going up to version 9 for Windows XP as part of the renowned Microsoft Visual Studio. This speaks plenty of its success.
Hopefully some of you will remember it, others might have actually used it, and others may behold it and sense the amount of work, thought and design put into it. All packaged in a nine-megabyte application. That’s right: 9 MB. I hope you enjoyed reading as I enjoyed writing and remembering. Thank you and see you next time!