Converting from FoxPro legacy systems to VFP

Although Visual FoxPro has stayed very compatible with legacy versions of FoxPro and all versions of FoxPro can share data files, there are some minor programming problems when you convert an application from a legacy system like FoxPro for Windows or DOS into Visual FoxPro. Much of the code can be transported straight from one language to the other but the disadvantage with this sort of conversion is that it leaves you with a system which relies on outmoded features.

The immediate effect is not too serious and the familiar behaviour may even be an advantage. Your application will look very dated but the users will be used to that. More serious problems arise in the longer term because you will find it difficult to take full advantage of the new features of the VFP family.

Compatibility across the FoxPro generations though is very good. As an extreme example, this is part of a screen shot showing a FoxBase program we wrote in 1990. The original source files are running in the VFP 9 development environment having had no changes made to them at all. As an experiment we tried running the original program simultaneously under DOS in the Windows XP console and found that they could share the same data files with no problems.

[FoxBase application in Visual FoxPro 9]

FoxBase was not object oriented and these legacy systems exist as a set of program (.prg) files which can be compiled into a VFP executable for distribution to the users. That would get the system running and solve the immediate problem but the application would be at a dead end in terms of any future development. If you needed to convert a similar system then the best tactic might be to rewrite it. This will take some effort but the good news is that the basic programming language has not changed and you will be able to reuse much of the logic in functions and procedures. What's more, you do not have to do it all at once. Visual FoxPro can read and write data to tables in FoxPro legacy format and the two versions respect each others' record locks.

The links below discuss six stages of converting a legacy Fox database:


Introduction | Data | Program code | Menus | Reports | Screens | Strategy

MS Access technical tips

Visual FoxPro technical tips

General Tips

 

More tips from Alvechurch Data

Converting FoxPro 2 data files to Visual FoxPro

Migrate data from a DOS or Windows legacy system to Visual FoxPro

Read More

Converting FoxPro 2 program code to Visual FoxPro

Converting program code from FoxPro version 2 to Visual FoxPro

Read More

Converting FoxPro 2 menus to Visual FoxPro

Converting the menu from a Fox 2 database into Visual FoxPro

Read More

Converting FoxPro 2 Reports to Visual FoxPro

Converting reports from a Fox 2 database into Visual FoxPro format

Read More

Converting FoxPro 2 screens to Visual FoxPro

Converting screens from a Fox 2 database into Visual FoxPro forms

Read More