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

elementary foxpro info 1

Status
Not open for further replies.

sodakotahusker

Programmer
Mar 15, 2001
601
I am commissioned with converting a foxpro 2.5 app to Microsoft Access. I have figured out how to convert the data but now I have the task of converting the code for data entry and reports. I know basically nothing about FoxPro.
What are the file extensions - .prg = program?
.app = ???

I am trying to figure out if I have the source code so I can run that application on my machine (the original is running on a network in a building 30 minutes away so in order to reverse engineer this code I have to figure out how to get this app to run in my environment. It seems it is looking for the dbf files on the network. Any change that information is stored in a configuration file or something instead of being hard coded inside the app??

Any pointers that someone can give me would be greatly appreciated.
 
.app is a compiled set of programs - halfway to being an exe but can only be run from the development environment. Here are some more.

.APP FoxPro applications.
.BAK Backup copy of a file.
.BMP Bit-mapped images.
.CDX Compound index.
.DBF Table.
.DBT FoxPlus memo.
.ERR Error listing.
.FKY Sets of Macro procedures.
.FLL External Windows libraries.
.FPT Memo.
.FRT Report memo.
.FRX Report definition.
.FXP FoxPro object program.
.IDX Single index file.
.LBL Label definition.
.LBX Label description.
.MEM Memory variable save file.
.MNT Menu table memo.
.MNX Menu definition.
.MPR Menu program.
.MPX Compiled menu program.
.NDX dBase III index.
.PJT Project memo.
.PJX Project description.
.PRG FoxPro program.
.QPR Query file.
.QPX Compiled query.
.SCT Screen memo.
.SCX Screen design.
.TBK Backup of memo.
.TXT Text file.

It will help you to know that reports are held in dbf-format files with fixed-width fields in the .frx and variable-width in the .frt. If you rename these to .dbf and .fpt you'll be able to link the tables into Access and look at things like report-time calculations, conditional displays and formats. Screens use the same arrangement with .scx and .sct files.

As for the path to the data - Fox is the same as Access. A poorly-designed application will have the paths hardcoded. A good designer will put them in an external file. Try looking for a very small .dbf (config.dbf?) or .ini file.

If you don't have Fox 2.5 then buy Visual Fox 9. You'll be able to open and run the Fox 2.5 files and you'll get a better idea of what's happening.

Geoff Franklin
 
Wow. Thank you very much. This should get my kickstarted quite nicely!!
 
As the opinion of a somewhat biased developer, rather than converting the FP 2.5 application to Access which is significantly much more limited in overall functionality, you should consider converting it to Visual Foxpro.

In that way you would be able to more easily maintain a majority of current code and, at the same time, open the door to a significantly more capable database environment.

Just a thought.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Thanks for the suggestion. In this case, I don't even know if we have the source code. My plan was to just reverse engineer the app. And I don't want to learn FoxPro just for this conversion. I live in the .Net world. So since I know Access and the client mentioned Access, it was a no brainer.
 
I confess I don't really approve of dropping a Fox database back to Access either. One of the strengths of Fox is that Microsoft have maintained almost complete compatibility from Fox DOS systems right through to the latest Visual versions. That's data and code compatibility so the upgrade process is really easy.

Having said that - I appreciate your reasons for doing it the way you are. If someone gave me a GW-BASIC application then I'd rewrite it in Fox rather than learning dotNet for a one-off project.

Geoff Franklin
 
If you don't have .PRG files, then you might not have some of the others you'd need. But if you have .PRGs, then you likely have the source code you need, just figuring it out correctly will be your hurdle.

There's at least some threads here talking about decompiling from APP or EXE if that really becomes necessary.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top