[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


What is Microsoft Visual FoxPro?

Published on
16,548 Points
2 Endorsements
Last Modified:
Olaf Doschke
Self-employed fullstack developer with backend preferences.
Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express).

Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx
FAQ: http://msdn.microsoft.com/en-us/vfoxpro/bb190289

As in many other MS pogramming languages the "Visual" does not denote a visual programming language in the strict meaning of the term, but a visual programming  environment with visual form designers. Before FoxPro was bought by Microsoft and upgraded to Visual Foxpro, there was FoxPro DOS and also UNIX and MAC versions, the DOS version was mainly used, and so UNIX and MAC versions were dropped. The added "Visual" mainly denotes VFP has a visual IDE and supports Windows UI. This is still limited to Winforms, WPF or Silverlight are a DotNet exclusive.

Does It Pay To Begin With VFP?

VFP was discontinued in 2007, also VFP is in the last support phase of the Microsoft support lifecycle - called extended support - which ends January 2015. Microsoft doesn't sell VFP anymore, mainly because it would then need to make warranties exceeding that end of support date.

Microsoft rather recommends to take a look at VS Lightswitch 2011. I don’t agree, as this does not give a comparable experience, neither for VFP developers nor newbies. It integrates into the full VS, but itself rather is aimed for application generation by wizards and assistants and templates than for development of larger scale applications. It partly covers, what VFP also offers, as VFP also has wizards and builders, but you better cope without them.

What I agree is, VFP is not a language you should begin learning anymore, despite needing it to convert and migrate it. VFP has grown from the eighties to 2006, not resulting in an elegant overall architecture. It's having a steep learning curve for that matter and for not being very compact and lightweight. The steep learning curve also goes for DotNet but obviously pays more due to it's future perspectives. You can make up for this using third party application frameworks, which will make you more productive, but less learning VFP than the framework architecture. And of course there is a helpful community mentoring and helping you to go in the right directions, if you still choose to learn VFP. But the same options go for DotNet, too, again.

As a developer newbie wanting to do a databased application, either go Access for really small apps, for which you can live without OOP classes, etc, or go for the real deal VS.NET - even just the Express versions offer a good consistent architecture.

For VFP developers, though, which have not yet migrated and extended their know how, VFP is still a good tool to create and maintain small to medium size database applications with a magnitude of 100 users and even better scalable, when using an SQL Server as backend database instead of native database files.

The FoxPro community is still rather active for being 5 years past discontinuation and a VFPX project formed on Codeplex around Sedna extensions generously released by Microsoft to the public domain, which were developed so far in the aim of VFP 10.
And besides this, VFP developers of course look for successors of VFP, which is the topic of the final section of this article.

The Database in short

VFP tables are royalty free and have a per file limit of 2GB. By this definition a database has no overall size limit, but you need to watch your fastest growing tables and either archive or split data.

Backup and Restore can obviously be done on the file level, any backup software can be used, ideally off-hours, or choose something with a snapshot feature.

VFP is no database server, every client directly accesses the table files, even if you introduce a so called database container (DBC), this merely is a lookup table itself containing some meta data info about the tables belonging to the database, eg their file names. It also contains stored procs (including DML triggers) and dbc events (DDL triggers). Both types of triggers can make use of the full VFP language.

VFP data also supports transactions, which work without an sql server and are communicated to other clients by making use of several file lock types. Manual table and row locks also enable you to do manual locking and VFP also offers buffering of changes instead of or additional to transactions. VFP transactions only conform to three ACID properties Atomicity, Consistency and Isolation, but not to Durability. No transaction logs are written, in case of a system failure, the result is loss of transactional data, meaning a roll back to the pre transaction state. At least that's making transactions fail gracefully. The same goes for buffered changes.

Like Access, VFP can also link to external databases via ODBC drivers or OLEDB Providers.

The Programming language in short

The programming language rather compares to Visual Basic language and supports both procedural and OOP programming styles. It's dynamically typed, still data is strongly typed and functions and expressions are strongly typed and won't do but a few implicit type conversions of numeric types.

Like Java, VFP is compiled into object code consisting of tokenized byte code. These byte tokens are run by the vfp runtime, which does no further just in time compilation on the specific cpu architecture an exe or dll runs. This makes VFP an interpreter with a precompiler rather than a compiler language, still you compile to EXE and DLL and need nothing but Windows and the runtimes to run a VFP executable.

You can create n-tier applications with VFP by it's OOP nature and COM support.

Pros and Cons


VFP is OOP, it offers not as much oop features as DotNet, but much more than Access with it's class modules. VFP offers the most important of course: inheritance. It also supports private and hidden methods or properties, but no interfaces and no events can be user generated.
VFP is very resource friendly, yet quite capable in working on several GB data (comparable to SQL Express or LocalDB). The VFP9 IDE can be used in Win2k or later and created EXEs can be used in Win98 or later.
VFP databases are royalty free, no CALs nor CPU licenses are needed.
VFP has SQL built in, it's part of the language, not seperate command strings you send to databases. It compiles and verifies at that stage.
VFP offers a feature of macro substitution, which means single line code generated and compiled at runtime, but even COMPILE is a command the runtime supports.
Interoperability end Extensibility: VFP supports ODBC and COM/OLE and is capable to connect to remote databases, do OLE automation of office applications and any other OLE automatable applications besides of course parameterized command line calls to other executables. You can also make use of COM DLLs and stdcall function DLLs. The latter in a special form of FLLs can also expand the instruction set with Functions.
VFP supports Webservices, eg via Soap Toolkit or third party XML Tools, both as server or client, and if you just use MS COM XML parsers and serialisers.
VFP can build COM Server DLLs, including multithreaded DLLs. These also can form the base of web services, which can be published via the Soap Toolkit or manually via DCOM/COM+ in IIS, some third party extensions bring VFP to the web this way.


Unicode support is very limited to a few string functions for conversion, the OS API offers more, there is no native control to display Unicode, but VFP supports ActiveX controls. VFP-Tables are generally coed in ANSI code pages including support of fontcharsets/scripts, which means double byte ANSI charsets. There are no Unicode field types, too, but binary field types can store anything, including Unicode texts, of course.
Security: VFP Databases can be encrypted using third party tools or the Windows Crypto API, but access rights or roles on the data have to be implemented on the NTFS file access permissions level.
Stability: DBFs have a bad reputation to often become defect. So do MDBs. Proper used, this is just partially correct. The most often header defect can be repaired with native VFP code, and there are third party tools to repair tables and related files. In single user mode on local HDDs, FoxPro databases are usable maintenance free, as most all defects have their root in concurrent file access and network errors, which then of course don't occur.

Size limitations: As already discussed, there is no overall limit but a per 2GB per file limit.

Successors of VFP

There are quite a bunch of candidates aiming towards VFP developers, who look for new directions. There are four main categories:


Languages, which - like VFP - evolved from the original dBase or Clipper, namely xBase++ and xHarbour.


VFP itself and it’s community extensions, namely VFPX at Codeplex and some more side projects


Some cloud based alternatives, from which FoxInCloud is stongly Foxpro based, not aiming for migration of the language but just the infrastructure. The same goes for ActiveVFP and VFP2IIS. Lianja supports Fox as one language and Servoy, which aims for Javascript developers and is Java based itself.


Efforts to reimplement Foxpro, which include Guineu (a DotNet based VFP Runtime, bringing VFP to Windows Mobile or other DotNet Framework supported platforms, VFPCompiler for .NET compiling Foxpro code as .NET apps and assemblies and Visual FreePro, as a new candidate in that range.I don’t mention Java and DotNet as successors, because they are a league of their own. They surely are a big option not neglectible but aside of the feature shrinked Lightswitch don’t aim for VFP developers. For professionals they are of course enabling you to go further into the enterprise league.

Database Migration

VFP Data can be easily converted and upsized to any server database from MySQL up to Oracle. As mentioned, VFP can make use of ODBC drivers and OLEDB Providers, opening the full range of third party databases. Surely MS SQL Server is one good new home of VFP data.

There is much more to say about this, for example it’s getting more complex, if the VFP database also has stored procedures, we’re back on the topic of migrating application code.

Still aside of stored procedures migration one thing to mention here is Sybase Advantage Database Server, which offers a newer 32bit and 64bit ODBC driver also usable for native VFP9 data, as long as no stored procs are involved.
  • 4
  • 3
  • 2
  • +1

Expert Comment

Good article. Ive been looking for something like this for ages.  

We have a application developed in FoxPro which is nearing the end of its life (basic functionality - it doesn't do what we want it to).  I've recommended a few alternative programs to management and wondered when the application life (the tools used to create the software) are finishing.  Looks like without a lot of development time, our software company wouldn't be able to improve on it.  We run a fork of software so we're the only ones running this version of the application.  There are probably better applications out there now that are developed with superior tools that will take us into the future.  

LVL 31

Author Comment

by:Olaf Doschke
>wondered when the application life (the tools used to create the software) are finishing
The product lifecycle of all MS products is public.
See http://support.microsoft.com/gp/lifeselect
in regard of
VFP9: http://support.microsoft.com/lifecycle/?p1=7992
VFP8: http://support.microsoft.com/lifecycle/?p1=3019
VFP7: http://support.microsoft.com/lifecycle/?p1=3018
So VFP7 and all earlier versions are already at the end of this lifecycle. That doesn't mean they don't function.

>"it doesn't do what we want it to"
It doesn't make sense to me, that you still use it, if you describe it as that.Is it software custom made for you? Why don't you address the vendor of that software?

If you can't answer a question yourself, why don't you ask, as an EE member?

Bye, Olaf.

Expert Comment

Thanks :-)

Yeah, its custom made.  We bought a company that was using it and the director (not IT) decided to keep it.  Me (being the IT manager) recommended other products that would be a better fit for our company  (meets more of our requirements), cheaper price and has more of a future in my opinion(more money/resources pumped into it).  I don't think the software company that developed it has the means to improve it.  Only one developer with a lot of forks of the product to maintain.

I'm not a developer (although i can program) so not sure what id ask the community? I usually just ask specific IT related questions such as how to solve a error message when programming.  I don't usually ask the bigger picture questions on forums as it can be quite difficult to get my point across and for someone to return their point.

Again Great article! Keep up the good work!
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

LVL 44

Expert Comment

Great article but I have to comment on some missinterpreted facts...

1) Microsoft still sells Visual FoxPro. You may select either Visual FoxPro OLP license or Visual Studio Pro with MSDN which is the main product used by developers.

2) Visual FoxPro for Mac was also developed

3) The announced end of VFP support cycle means almost nothing for developers and products based on VFP.  Applications developed in the old FoxPro 2.6 are still running even when the Microsoft support was discontinued 15 years ago.

I don't know any people who could say "Yes, Microsoft suppor helped me to fix my Visual FoxPro issues". Visual FoxPro has a strong user community which is the main advantage. This community can help to find out an alternate solution if somebody has problems, this community still develops open source VFP add-ons, and this community supports thousands of live FoxPro applications over the world.

VFP developers can still develop new applications for Intel based desktops and servers and these applications are cheap, reliable, and fast. Of course, to develop internet applications in VFP is not so easy (but open source ActiveVFP allows it) and to run VFP on non-Intel platforms is almost impossible today.

4) The last note to one of your cons: The FoxPro application stability depends on your infrastructure and environment stability. Our VFP application which is accessed by hundred users every day and running as a multithreaded COM DLL on a server did not report any DBF file damage for years. Users are spread over the country and application runs both on LAN and WAN and even over the cell modems... To port this application into a different language would be very expensive and we don't have any reason to do it.

Expert Comment

by:Eduardo Fuerte

Asking about VFP successors, do you know its progress after the last year ? particular Lianja that apparently is the more active project, although last opinions was not encouraging...

My particular concern is about for Windows development continuation on my projects since the for internet evolution I've choosed PHP.
LVL 31

Author Comment

by:Olaf Doschke
I am using VFP & PHP in private, and go the MS route (.NET) professionally, so I can't say much about successor development, sorry. I started working for a new company since yesterday, who are Microsoft Partners, so this will continue in that direction: C#, DevForce, Telerik Controls.

One thing mentionable about successors is, that the Guineu project went open source at https://bitbucket.org/cwollenhaupt/guineu

This step drops the plan to have paid subscriptions. It says there is not much interest in a non free successor of foxpro, besides perhaps legal issues prevent making a compatible product successor.

The best thing you can do with your VFP applications is introduce N tier architecture and be able to switch database to something else, then GUI and finally move the application logic into another language. DotNET enforces such layers more than other development platforms anyway,

Web development enforces you by the mere topology of clients and servers. With Ajax many things have been redone, which you could do on the desktop since a long time, eg Drag&Drop, so partly to me that's a celerated development of things we already had, the big plus is doing all stuff in the internet or cloud, instead of just locally, removing the need to share results in form of data or documents, but simply collaborate on a centralized world wide available platform or database and being able to use the power of data centers vs a single pc. That's what you can't deny makes some things worth the new hassles.

Bye, Olaf.
LVL 44

Expert Comment

I would not say legal issues preventing the compatible product creation exist... It is simply too difficult or too time consuming.  And it is difficult even when you apply some level of incompatibility like different index structures etc.

Xbase++ vendor has expressed the situation in following words: Even when we do not implement the full VFP compatibility we know VFP developers will come sooner or later...

Expert Comment

by:Eduardo Fuerte
After reading and reflect...

In order to optimize efforts I'm planning to use a PHP based framework to produce for Windows Forms : PHP-GTK classes or other more convenient (if exists).

When migrating from  VFP to  PHP I put the more heavilly DB acttions in MySQL as SP(s) and SF(s) so the data layers are separeted from the view layer.

So if it could be done in PHP I'm going to have similar code to do the job independently of being internet or Windows Forms. Investing only in PHP...

Expert Comment

by:Eduardo Fuerte
Just to complete... after have been assisted by one of the most qualified PHP experts (Ray) I had the veredict - for my purposes (physical shops f. e.) PHP doesn't have a reasonably solution anyway. I have to mandatorily go to Windows Forms (.net).
LVL 31

Author Comment

by:Olaf Doschke
Reacting very late to your responses, Eduardo, but we lately met in several questions, so I thought I'd address this. It might also interest others.

Well, it's everybodies own decision and not the core PHP function, but you can do PHP local, too, be it in a intranet or from a web based central installation. You can have a html frontend working with a cloud or classically hosted application and on intranet. The last mile not coverable with PHP in general is about local devices, but you don't necessarily need a winforms app to integrate them, it's just simpler, but the overall .net solution typically is neverhteless asking a lot more architectural knowledge from you, a VFP developer typically misses.

PHP is of course no single language able to replace VFP, but its integration with MySQL is a symbiotic pair very well covering the package VFP and DBF are, minus frontend. So, yes, of course there is a lot to do to add HTML and CSS and Javascript/jQuery or other stuff, and even assuming you have that knowledge you have a barrier to local resources you have to bridge somehow, eg for integrating barcode scanners or electronic scales used in many applications from POS system to lab software. That could be a part submitting it's data to some layer accessible by JQuery or PHP. For example take a look at http://phppointofsale.com/. Watch the video, which demos at about 2:00, how this browser based PHP application can be used by shop clerks to scan in products and print a receipt.

I don't say PHP is covering all needs, as it only is one part even of simpler web app, you have to add a frontend. But as I said in the article:

I don’t mention Java and DotNet as successors, because they are a league of their own. They surely are a big option not neglectible but ... don’t aim for VFP developers.

If you're fine to go that route anyway and get forward and have anything you need there, then that's your solution, but there are also those, who already used VFP to do web applications with west wind packages or AFP or FoxWeb and others, and for those PHP surely is a good successor. You often don't need to address local resources, then that part not covered by a browser frontend also becomes unnecessary. So I still stick with my recommendation for PHP as one general solution often overseen, just because it's no desktop solution.

Bye, Olaf.

Expert Comment

by:Eduardo Fuerte
Hi Olaf

Thank you for your concerns. I'm going to better research your suggestions.

Featured Post

Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Join & Write a Comment

Did you know PowerShell can save you time with SaaS platforms? Simply leverage RESTfulAPIs to build your own PowerShell modules. These will kill repetitive tickets and tabs, using the command Invoke-RestMethod. Tune into this webinar to learn how…
A query can call a function, and a function can call Excel, even though we are in Access. This is Part 2, and steps you through the VBA that "wraps" Excel functionality so we can use its worksheet functions in Access. The declaration statement de…
Other articles by this author

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month