Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting FoxPro 2.5 to Visual FoxPro 6 1

Status
Not open for further replies.

bborel

Technical User
Jan 20, 2004
16
0
0
US
The company I work at has some legacy apps that were specially programmed for them using FoxPro 2.5, now they have to migrate some of their departments to Windows XP, however the apps written in FoxPro 2.5 crash on XP.
I'm not a programmer, although I'm learnhing right now, is there an easy way, or a utility to convert these apps from 2.5 to Visual FoxPro 6? I've tried recompiling these programs, and they do finish without errors, however when I try and run the EXE I get all kinds of errors. Any help reatly appreciated. I'd be willing to migrate these programs to other platforms as well, just as long as they end up working under XP.
 
bborel

Sorry to say, but a total re-write is the only way to go and your company will only benefit from it. There is no magic converter.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Can you give me a brief explanation as why? I have to justify trying to hire a programmer is the only reason I ask, thanks for your quick reply.
 
bborel,

Nope, there's no magical silver bullet for this. As for converters there is the one that comes with VFP. Just start opening the scxs, frxs, etc. up in VFP. On the screens you will be asked to make a decision on a visual or functional conversion. Visual will just give you basic screen that looks like the other one and you have to put the code back in by hand, functional will give you a screen with the code intact, but VFP does a lot of weird stuff with this step and you will end up with formsets and pageframes, and code in all kinds of deprecated methods. It isn't pretty, but if your application is of reasonable size and is not going to have to be modified a lot in the future then it may be the route for you. There are all kinds of things to look out for, such as in Foxpro 2.5 the variables "lnJustATestToCheck" and "lnJustATes" are the same (because it only checks to the 10th character of the variable name, but in VFP they are obviously not the same. Depending on the complexity and convolutedness of the application you are looking to convert you may have a long road ahead of you.

Just a thought, what is the error you are getting that has precipitated this need to convert? Have you asked in the other Foxpro forum to see what people are doing to workaround it? I would be shocked if there aren't any Foxpro 2.5 apps running on Windows XP out there. 16-Bit though past its prime is certainly not dead yet.

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
bborel,

I have a few apps running quite solidly on XP that are all written in FoxPro 2.5. I suspect there as Slighthaze suggest, other underlying issues here.
Make sure you have clean files. Start with getting rid of temp files, and deleting the FOXUSER.* files. Then do a complete rebuild of your index files. Don't reindex, delete the .IDX's and/or .CDX's and rebuild them from scratch.
Then ensure your network/file buffering settings are correct.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
bborel

Can you give me a brief explanation as why? I have to justify trying to hire a programmer is the only reason I ask, thanks for your quick reply.

I'm not a programmer, although I'm learnhing right now, is there an easy way, or a utility to convert these apps from 2.5 to Visual FoxPro 6?

Unlike Dave S. who has few apps running on XP, I do not, but I did many conversions and I noticed that most advantages are mostly how VFP communicates with Windows in regards to the reporting aspect and printers, COM server, Automation etc..Data handling is pretty much the same.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Researching this further it seems like my problem is a known issue with running FoxPro 2.5 Apps. Seems like there is a patch from MS the fixes the divide by zero error on fast computers, so maybe it's not an XP issue but the processor speed. The only problem is that it is specifically for FoxPro 2.6a, which all I have is 2.5 and 6.0, I'm going to try it anyway, thanks for the information guys.
 
The "international" version of the FPW Fast CPU patch should work on 2.5 (or 2.5b - which is much more stable!). If it doesn't, do a web search on DZPATCH - this will correct the problem on all versions of FPW and was available before MS acknowledged there was a problem. When MS released the "official" fix for FPW 2.6a, they requested that DZPATCH be withdrawn, but it's still out there if you look for it.

Rick
 
Here is another thread with more information that may assist you.


Rewrite an old app in FoxPro 3.0 or Newer
thread184-721495

Jim Osieczonek
Delta Business Group, LLC
 
...it's still out there if you look for it.

I put it on my web site if you want to grab it from there.
Just follow the link under my signature and scroll down untill you see "DZPATCH".


-Dave S.-
[cheers]
Even more Fox stuff at:
 
I actually got the IPatchFP to work, I no longer get devide by zero problems. However, now FoxPro 2.5b runs fine (it wouldn't run under XP before), and I can open a project and run it as an APP within FoxPro, but when I try and run just the EXE of the program I recompiled it opens the program for a second and then closes out with no error messages at all. I'm at a loss, we increased Files in config.nt which I've seen on some threads to work, but it's not working for us. I'm so close to getting these programs to work under XP it hurts......
 
Hi.

In XP, try to select Win95 Compatibility (in the shortcut of your App), or run it in 265 colors. I fix a lot of ours problems.

Hope that help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top