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

Rebuilding a Foxpro Project

Status
Not open for further replies.

virgo

Programmer
Jun 21, 1999
88
US
I have a large foxpro 2.6 (Win) that probably needs to be rebuilt. I am getting such error messages as 'code not found', 'incorrect version of code', etc.

I have an *.app file. I have no documentation as to what goes into the project.

Are there any things that I should watch for?

(Needless to say, I have set up a 'play space' far away from the network activity.)

Is there any way to do this other than 'I wonder what would happen if'?
 
I have all kinds of other scx, prg, and all kinds of things. I don't know which of these belong in the project, and I don't know how to find out which ones should be in the project.

Because of the number of files that are involved, 1.7 Gig worth (I haven't counted all them), and this does not include the databases, if I could figure out what was essential and just put these in, that should cut down on the number of files.
 
See if you can make a reasonable guess as to the top-level program. Try looking for one called MAIN or something similar. Failing that, try looking for one that is the same name as the program (IOW, if the program is "the Widget Tracking System", try finding a file called WIDGET or WTS or WTSMAIN or some such).

Assuming you can find one of these, create a new project MODIFY PROJECT MYPROJ and adding this file; it should automatically be designated as the "main program" since it is the only one at this point. Then choose Rebuild Project from the Project/Build menu, and all programs called by that one (and so forth down the calling tree) will automatically be added.
Robert Bradley
 
Thank you for your reply.

Now, I get in and get started and the error message is 'Memo file is missing or invalid'. It is the same fpt file that was in the project from the beginning. It does work, or at least does not generate an error message in the live system.

Although this is just a warning, it throws me out of the 'project'.

TIA
 
Virgo,

Good News that at least you can get in and not generate an
error within the live system.

If you wish to try and resolve your 'Memo file is missing
or invalid' message there are a few things you can try.

1. Try to isolate which file is causing the error message.

Most likely it will be a FPT file which is the associated Memo File for a Database (DBF) file. However,
it could be your project memo file (PJX) or even a screen
Memo File (SCT).

In trying to isolate the file get a listing of all fpt files
within the project and then within the Command Box within Foxpro type in the command <use database> substituting database with the name of the fpt file which you have from the list. The same warning message will appear if this is the faulty file. Do similarly for (PJT) and SCT i.e open then up as databases with command <use myscreen.sct>.

Having located the damaged file(s) you have 3 options:

1). Purchase a copy of FoxFix which repairs such damaged
Memos.

2). Write a foxpro program yourself to transfer the information from the damaged DBF and FPT file to a new DBF and FPT file. Define your own conditions within the transfer program as to which records should be discarded or transferred (i.e length of Memo field > 30000 chars, excessive number of Ascii Values > 128 within Memo field etc...

3). Try opening the damaged file in Excel. Occassionally this will repair the Memo.

As always, be sure to take a copy of your starting files before any of the above.

Good Luck.
 
I haven't done as much with this as I would have liked to. Viruses got in the way.

I am lucky. I do have a lot of hard drive space. So, I have the whole system on another hard drive.

However,,,,
I picked a file called Ampac to use as the main project file. When I started a rebuild on this, it kept saying things like 'event handlers not present', 'error handlers not present' etc.


 
I did have foxfix on a machine. I had used it on dbf files but on nothing else.

I used it on the cdx files and fpt files this morning. I just went *.* on the directory.

Now, I get invalid fpt files and invalid cdx files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top