What is Microsoft Visual FoxPro (VFP)?
Microsoft Visual FoxPro (VFP) is an object-oriented programming (OOP) environment with a built-in relational database engine. It was originally developed as a relational database application by a different company, evolved into FoxPro after a few years and eventually into Visual FoxPro once Microsoft took over its development.
Microsoft ended development and marketing of VFP in 2007 and ended support a few years later. The support packs for the last two versions of VFP can still be downloaded from Microsoft's site. Although VFP is largely obsolete now, some organizations continue to use it to build database-driven applications for desktop, web and client-server deployments, particularly if they operate in industry sectors that require custom or modular software.
History of Visual FoxPro
Visual FoxPro was the ultimate incarnation of a relational database program originally called FoxBASE. Fox Software introduced FoxBASE in 1984, basing it on the dBase database management system (DBMS) from Ashton-Tate, albeit with many speed and usability improvements, plus features like a built-in development environment and an interactive command environment. Also, dBase ran only on Control Program for Microcomputers and Microsoft Disk Operating System (MS-DOS) systems, whereas FoxBASE was built to run on all the mainstream operating systems (OSes) of the time and of today, including Linux, Windows and macOS.
By 1989, FoxBASE had been renamed to FoxPro. Over the next few years, Fox Software released multiple versions of the software, including FoxPro 2.x for MS-DOS, Windows, Mac, Unix and Linux. Microsoft acquired Fox Software in 1992 and took over the development of FoxBASE.
In early 1993, Microsoft shipped its first version of the software. By 1995, three years after Microsoft acquired the company and its technology, FoxPro had evolved into Visual FoxPro, or VFP. In fact, this was the name given to the product when its next major version, VFP 3.0, was released in 1995.
Microsoft released five more versions of VFP from 1996 to 2004, skipping version 4.0 and going right to 5.0, and ending with Visual FoxPro 9.0. Under Microsoft's ownership, VFP evolved from a structured programming procedural language to an object-oriented one, supporting the development of 32-bit applications, code reuse and Extensible Markup Language (XML) web services.
At the time, VFP and its predecessors were among the top PC database platforms when that was a vibrant product category in the 1980s and early 1990s. By the mid-1990s, however, the market shifted toward higher-level relational DBMSes (RDBMSes), such as Oracle and Microsoft SQL Server.
Microsoft 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 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 complementary technologies that were compatible in some areas, such as support for XML. But it maintained VFP as a standalone database development platform and didn't create a .NET version of the VFP language.
Microsoft stopped supporting v8.0 (Microsoft Visual FoxPro 8.0 Professional Edition) in April 2013 and v9.0 (Microsoft Visual FoxPro 9.0) in January 2015.
Key features of Visual FoxPro
Affectionately referred to by users as "the Fox," Visual FoxPro evolved into a mature programming language that supported a modular style of development and enabled developers to reuse code to speed up application development. In VFP, an OOP language and a database engine were tightly coupled together, making it suitable for handling complex data operations and building extensive database applications. Even so, use of the VFP database was not required as part of VFP applications. The OOP nature of VFP enabled developers to create reusable classes and objects, so they could develop applications faster and build more scalable applications that were easy to maintain.
Furthermore, VFP included a powerful data engine and supported Structured Query Language (SQL), making it suitable for data-centric applications. The tight coupling notwithstanding, the built-in engine could be supplanted by SQL Server for users looking for improved security, reliability, replication and other database features during development.
Microsoft positioned VFP as a set of developer tools, not a standalone DBMS, like SQL Server. An integrated development environment was included in VFP with a code editor, form designer, debugger and other tools. The VFP tool set also included reporting tools and tools for organizing and indexing database tables, querying data and programming end-user applications. It also provided productivity tools and features to further simplify code development, maintenance and reuse.
The language also provided predefined class libraries with foundational elements that could be added to applications. Also, custom builders -- programs that enable the direct manipulation of properties and methods in design mode -- could be distributed with class libraries to provide a user-friendly object editor. VFP could be extended with custom functions, libraries and third-party add-ons, enabling developers to enhance an application's existing features.
Visual FoxPro supported Microsoft's SOAP Toolkit, a useful resource that provided a development infrastructure to build, expose and consume web services via Simple Object Access Protocol. In addition, VFP includes an Open Database Connectivity driver that enabled data in VFP to be queried and updated from Excel, Word and Microsoft Access via an ODBC interface. The VFP 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.
Limitations of Visual FoxPro
Since Microsoft no longer develops or supports VFP, its maintenance and usability are serious limitations for users. Further, a lack of new functionality and built-in design limitations hamper innovation, with developers being forced to make do with VFP's existing features and vocabulary to develop applications.
Size limitations of VFP's native database are another problem. It can store only a limited amount of data, which can be a serious drawback for businesses that work with large volumes of constantly changing data. VFP's database limitations are also problematic for companies that need the database to connect with a large number of data sources.
Security is another limitation of VFP. The product's end of life (EOL), plus VFP's waning popularity, means that Microsoft does not frequently release security patches or other security-related upgrades for VFP -- although one update, called Visual FoxPro 9.0 SP2 rollup update, was released as recently as 2021.
The lack of security updates means that VFP may contain security vulnerabilities that may be exploited by cybercriminals and other threat actors. These weaknesses and the outdated nature of VPF make the organizations still using the software vulnerable to cyberthreats, like malware or ransomware infections, data breaches and unauthorized access to enterprise resources.
Finally, companies need to be aware of VFP's OS limitations. Those using a 64-bit OS or older hardware may experience compatibility issues with VFP, in addition to the other limitations mentioned above. They may also need to invest in additional hardware, such as emulators to run the 32-bit VFP program on 64-bit systems. Companies using 32-bit OSes may not experience the same issues -- although the other limitations are still relevant.
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 EOL. However, users can still download service packs (SP2) for VFP 8.0 and VFP 9.0 from Microsoft's website, along with Graphics Device Interface Plus dynamic link library updates, Sedna add-ons, Microsoft Object Linking and Embedding, Database Provider and XSource for these versions. The source code for Visual FoxPro 8.0 SP1 Task Pane is also available for download on Microsoft's site as of September 2024.
That said, developers should keep in mind that these downloads date back to 2016. As a result, even with the available downloads applied, their VPF installation may not be fully secure for use in production environments. It may also contain the other limitations previously discussed.
Despite VFP's official EOL, VFP communities still exist -- many of which continue to develop VFP code, classes and libraries and run forums to answer questions from VFP users and developers. Also, the VFPX initiative develops open source add-ons to support, extend and promote the language. VFPX was originally hosted on Microsoft's CodePlex open source project site but moved to GitHub in 2017 when Microsoft shut down CodePlex. These adds-ons are still available on GitHub as of 2024.
VFP 9.0 system requirements
Microsoft Visual FoxPro 9.0 only runs on some older versions of the Windows OS: Windows 2000 SP4, Windows XP SP2, Windows Server 2003 SP2 and Windows Vista. It requires at least 64 megabytes of memory, but Microsoft recommended 128 MB or more. A typical installation also needs 165 MB of disk space.
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 code 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
This is a longer sample that illustrates how to use a stored procedure to create a unique default ID value for a database field:
FUNCTION NewID(tcAlias)
LOCAL lcAlias, lnID, lcOldReprocess, lnOldArea
lnOldArea = SELECT()
IF PARAMETERS() < 1
lcAlias = UPPER(ALIAS())
ELSE
lcAlias = UPPER(tcAlias)
ENDIF
lcOldReprocess = SET('REPROCESS')
* Lock until user presses Esc
SET REPROCESS TO AUTOMATIC
IF !USED("IDS")
USE newid!ids IN 0
ENDIF
SELECT ids
IF SEEK(lcAlias, "Ids", "table")
IF RLOCK()
lnID = ids.nextid
REPLACE ids.nextid WITH ids.nextid + 1
UNLOCK
ENDIF
ENDIF
SELECT (lnOldArea)
SET REPROCESS TO lcOldReprocess
RETURN lnID
ENDFUNC
Developers who are working with OOP and microservices can address common microservices issues by applying the principles of OOP. Also, there are several different database options for organizations to choose from. Learn more about how DBMS and RDBMS compare.