You are here:

FoxPro/How to clone the FoxPro project

Advertisement


Question
Hello,

I need to replicate the existing project created with FoxPro5.   It's a standalone program with about 10 tables. The new project will use the same programs, and starts with an empty database.

Would you please give me an idea what is my steps will be?

Thank you in advance,
Larisa

Answer
Hi Larisa,

  Hopefully, the new project is in a FoxPro version newer than 5.  If so, oddly enough, the worst part will be getting the empty data tables, so I'll start with that.  There are a few ways to get what you want.  If the data in the tables is not needed (either it's obsolete or you have copies), open each table (with USE) and use the command ZAP.  It permanently removes all data.  If you still neet the existing data, you can open each table (again with USE), then use the command COPY STRUCTURE TO <NewFile> WITH CDX.  The result will be only the database structure, without data.  The WITH CDX component also copies any existing structural index.

  To create the new project use:  CREATE PROJECT <NewProj>

  Once the new project is open, go to the "Code" tab, Click on "Programs" - then, click on the "Add" button.  You will get a file select list.  Select the starting program of the project and add it to the new project.  Once that project is added, click on the "Build" button and re-build the project.  You could also click on "Win32 executable..." to create the new EXE file.  That will re-build the project first and create the new executable program.  Any programs, forms and reports used by the starting program, or subsequent programs or forms will automatically be added to the project.

  If you don't know which PRG is the starting program, you can find it by looking at the old project file.  Open it with MODIFY PROJECT <ProjName>.  It will be in the "Programs" list in bold letters.   The project name is the file with the extension "PJX."

  If you have any problems or questions, please feel free to post a follow-up question.

Good Luck,

Fred

P.S. Please enter a rating just so you can use the COMMENTS to let me know if it worked out.  
I'm far more interested in knowing if it helped than in the rating system.

FoxPro

All Answers


Answers by Expert:


Ask Experts

Volunteer


Fred Frase

Expertise

Questions about development only. No installation or hardware specific questions, please. Your first step in requesting assistance should be to identify the version of FoxPro you are using. I can write short functions but, PLEASE do not ask me to write programs for you.

Experience

Nearly 30 years professional programming experience using FoxPro (FoxBase through VFP 9) or other xbase language, primarily in Windows environments.

Education/Credentials
Completed a 1,000 hour diploma course in programming at International Academy of Ohio (subsequently merged with Southern Ohio College).

©2016 About.com. All rights reserved.