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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

advice upgrading 2.6a to VP8

Status
Not open for further replies.

bobarnett

Technical User
Nov 19, 2003
13
US
Many years ago I purchased an accounting program that was written in FoxPro 2.6a. In order to do extra things that the accounting program did not do, I also purchased FoxPro 2.6a. Recently the accounting program was re-written in Visual FoxPro and now my 2.6a can't access the restructured DBF files because the headers have been changed. I get the error "Not a DBF" when I try to open them.
So now I am considering purchasing FoxPro 8.0 but I wonder if I will have to re-write all the fxp's that I have been using. Can anyone tell me if VP8 can import/translate/run my original programs or is there some sort of translation utility available for this purpose?
 
The best idea is to forget converting, and just rewrite the application - in the long run it'll take less time AND you'll be happier with the end result. That being said, the most useful information I got on migrating, came from MicroEndeavours, Inc. They have a self study course VF610 "FoxPro 2.x to Visual FoxPro Migration Manual" click on the "self-study offerings" link, then down near the bottom of the page.

This includes a number "why's" and "how to's", as well as some useful utilities to assist in the process. One of their techniques allows a gradual transition using a mixed model, but there are some downsides as you might expect. Also, one utility can create forms from the running code - you don't even have to have "screens" (.SCX files) to convert them. For the price - $249 that last time I checked - you can't get better advice. (I have no connection with them, other than being a satisfied customer.)

Before you spend the money, you may want to look at Chuck Urwiler's FoxPro Advisor article at: This article is really an overview of the techniques used by the MEI "FoxPro 2.x to Visual FoxPro Migration Manual". Chuck actually developed the code / course / book when he was still working there. I originally took the course when he presented it as a post-DevCon session back in 1997!

You may also want to check out the new "Painless Legacy FoxPro Applications On Modern Networks (ebook only)" available at
Rick
 
As Dave says, your programs will probably run fine, although what you want to run are the .prg's, not the .fxp's. VFP 8 may automagically recompile them, but if not, just delete the .fxp's so that the .prg's get recompiled.

Also, as Dave says, if your add-on programs have an interface of any kind, you may have some work ahead of you.

Since 2.6 can't open the database files, you're sorta stuck with upgrading anyway, so give it a shot, and if you need more help, you know where to find it. :)
 
Having been thru a pretty large 2.6 to Visual foxpro conversion I can tell you I agree with rgbean 100 percent. You are much better off rewriting it.

However, I would still go thru the upsizing wizard TOOLS/Wizards and let it upsize for you once so you can see what it generates. I wouldn't use much, if any of it, but it will give you an idea of the form structure, etc. if you are new to VFP.

Jim Osieczonek
Delta Business Group, LLC
 
Thanks, guys. You've given me a lot of help here. I appreciate it. I definitely feel a bit more encouraged.
 
Bobarnett,

You've received some excellent suggestions, but there is an alternative approach.

It seems that your only problem is that your old 2.6a program can't read Visual Foxpro files. The functional requirements of your old program have not changed? Is that correct?

If so, write a tiny Visual Foxpro program that opens each of the files in turn, and saves them back to 2.6a format. In other words:

USE ANewDBF
COPY TO TheOldDBF TYPE FOX2X

Of course, that won't let you share the data between the two versions on a concurrent bases. You will be taking a periodic snapshot of the new data for use in the old program, but if that would meet you requirements, it would be a very simple solution.

Mike


Mike Lewis
Edinburgh, Scotland
 
Mike, This is a very good idea and I may do that with some of the files. I assume after running a 2.6 untility on the files, I asume I could then save it back into a VP8 format. Would this work?
 
Mike,

It's not often I disagree with you - you're quite sharp. However, when it come to upgrading from 2.6 to VFP I think a rewrite is the best way to address it. A lot of the 2.6 conde can be maintained, while producing a nice object-oriented foundation with property, events, and a good session variable.

In short, I think there is more to it than just making VFP read old tables - this approach fails to take advantage of many of the VFP benefits.

Jim Osieczonek
Delta Business Group, LLC
 
Jim,

It's not often I disagree with you - you're quite sharp

Thanks. But, you know, it's not really a question of agreeing or disagreeing. We all have our own ideas about how to solve a problem. I definitely don't disagree with your comments. In fact, I endorse the view that a re-write from 2.x to Visual is a good way to go.

However, in this case, Bobarnet's problem was not how to get his old app running in VFP. It was how to deal with the incompatibility between the files in the two versions. I'm not saying my solution is the ideal one, but I really feel he should at least consider it.

Mike


Mike Lewis
Edinburgh, Scotland
 
Bobarnett,

. I assume after running a 2.6 untility on the files, I asume I could then save it back into a VP8 format. Would this work?

No need to do that. VFP will happily open the files without any conversion. However, remember that VFP will be expecting to process the original files, not the copies. So you might need some code to copy the 2.6 files over the VFP ones.

Mike


Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top