Microsoft Visual FoxPro (VFP) is an object-oriented programming environment with a built-in relational database engine. Microsoft ended development and marketing of VFP in 2007, but it can still be downloaded and used to build database applications for desktop, web and client/server deployments.
Visual FoxPro culminated a line of software that originated in 1984 under the name FoxBASE, and that was later known simply as FoxPro before becoming VFP in 1995, three years after Microsoft acquired the technology. Together, VFP and its predecessors were among the top PC database platforms when that was a vibrant product category in the 1980s and early 1990s, before the market shifted toward higher-level relational database management systems (RDBMS), such as Oracle and Microsoft SQL Server.
In the heyday of PC databases, the FoxPro line competed primarily with dBase, an earlier technology on which it was based -- making it one of several so-called xBase clones that were built to work like dBase. Later, under Microsoft's ownership, VFP evolved from a procedural language to an object-oriented one, supporting the development of 32-bit applications, code reuse and XML web services.
Key Visual FoxPro features
Affectionately referred to by users as the Fox, Visual FoxPro includes an object-oriented programming language and a database engine that are tightly coupled together. Microsoft positioned VFP as a set of developer tools, not a stand-alone database management system (DBMS) like SQL Server. In fact, use of the Visual FoxPro database isn't required as part of VFP applications. Despite the tight coupling, the built-in engine can be supplanted by SQL Server if users want more robust security, reliability, replication and other database features.
The VFP platform bundles together tools for organizing database tables, querying data and programming end-user applications, plus predefined class libraries with foundational elements that can be added to applications. It also offers productivity tools and features designed to further simplify the process of developing, maintaining and reusing code; for example, user forms that can be docked to applications and the ability to save system properties and custom user interface settings for later use.
Visual FoxPro supports Microsoft's SOAP Toolkit, another discontinued, but still downloadable technology that enables applications to connect to XML web services via the Simple Object Access Protocol (SOAP). In addition, VFP includes an Open Database Connectivity (ODBC) driver, which enables data in Visual FoxPro to be queried and updated from Excel, Word and Microsoft Access via an ODBC interface. The Visual FoxPro ODBC driver also enables developers to use the VFP database as the data store for applications written in C, Microsoft Visual C++ and Microsoft Visual Basic.
Visual FoxPro history and versions
FoxBASE was initially developed by the former Fox Software, which changed the technology's name to FoxPro in 1989.
Microsoft bought Fox Software in 1992, one year after the latter released a FoxPro 2.0 update. In early 1993, Microsoft shipped the first Windows version of the software, which previously ran on MS-DOS, Mac and Unix systems. The product's name was changed to Microsoft Visual FoxPro when the next major version, VFP 3.0, was released in 1995.
Microsoft released five more versions from 1996 to 2004, skipping version 4.0 and going right to 5.0, and ending with Visual FoxPro 9.0. It stopped development work on the database after making Visual FoxPro 9.0 Service Pack 2 (SP2) available in October 2007, as well as issuing a 9.0 add-on pack resulting from a project code-named Sedna in January 2008. The Sedna pack included several features for extending VFP 9.0's integration with SQL Server, Visual Studio and elements of the Microsoft .NET framework.
Despite the Sedna add-ons and the inclusion of Visual in its name, Microsoft VFP wasn't part of either Visual Studio or .NET. Microsoft described Visual FoxPro and Visual Studio as complimentary technologies that were compatible in some areas, such as support for XML. But it maintained VFP as a stand-alone database development platform and didn't create a .NET version of the VFP language.
VFP end-of-life support and continued use
Microsoft announced in March 2007 that Visual FoxPro 9.0 would be the last version of the software. It didn't replace VFP with another technology. Instead, the company narrowed its database strategy to focus on SQL Server as its mainstream RDBMS platform and Access as a lighter-weight database for use with Office applications.
Microsoft ended mainstream technical support for Visual FoxPro 9.0 in January 2010, and extended support ended in January 2015, officially signaling its end of life. However, as of May 2017, users can still download VFP 9.0 SP2 from Microsoft's website, along with product documentation, the Sedna add-on pack, and several utilities and security patches. Visual FoxPro 8.0 Service Pack 1, which was released in 2003, also remains available for download.
In addition, a community-based initiative to develop open source extensions and add-ons for Visual FoxPro 9.0 continues to operate. The VFPX initiative includes the Sedna technologies, which Microsoft released as open source code. VFPX had been hosted on the company's CodePlex open source project site, but moved to GitHub in 2017 because of Microsoft's shutdown of CodePlex.
VFP 9.0 system requirements
Microsoft Visual FoxPro 9.0 only runs on some older versions of the Windows operating system: Windows 2000 Service Pack 4, Windows XP Service Pack 2, Windows Server 2003 Service Pack 2 and Windows Vista. It requires at least 64 MB of memory, but Microsoft recommends 128 MB or more. A typical installation also needs 165 MB of disk space, according to the company.
The Visual FoxPro database is limited to a capacity of 2 GB per table, due partly to its 32-bit architecture. SQL Server, which includes 64-bit support, is a more realistic option for organizations that need larger tables and more scalable databases, as well as ongoing technical support.
Visual FoxPro source code examples
Microsoft's website provides code samples for various operations in Visual FoxPro. This snippet shows how to combine data from country and customer tables via a full outer join function:
SELECT Country.*, Customer.country, Customer.cust_id;
FROM testdata!customer FULL JOIN country ;
ON Customer.country = Country.country
And here's a longer sample that illustrates how to use a stored procedure to create a unique default ID value for a database field:
LOCAL lcAlias, lnID, lcOldReprocess, lnOldArea
lnOldArea = SELECT()
IF PARAMETERS() < 1
lcAlias = UPPER(ALIAS())
lcAlias = UPPER(tcAlias)
lcOldReprocess = SET('REPROCESS')
* Lock until user presses Esc
SET REPROCESS TO AUTOMATIC
USE newid!ids IN 0
IF SEEK(lcAlias, "Ids", "table")
lnID = ids.nextid
REPLACE ids.nextid WITH ids.nextid + 1
SET REPROCESS TO lcOldReprocess