What Every Visual FoxPro Owner Should Know

posted in: Uncategorized 0

In the past 40 years I have inherited a few dozen major FoxPro/Visual FoxPro applications and a few hundred minor ones.  My writings are based upon real world experiences and in some cases, real-world disasters.  If you are the owner of a Visual FoxPro custom program, I hope you will carefully consider learning from my experiences.

Source Code: What Is It? Do I Own It?

  • You, as a business owner, may feel that this is too technical.  But I can assure you that if you ever lose your source code, you will wish that you had taken a few minutes to understand what I am about to share with you. If you still have questions after reading this, feel free to contact us.

  • What is source code?  Few people know what this is, but it could be critical to the health of your company that you not only know what it is but that you understand what I will be talking about below.  To learn more about what source code is, click here: What is Source Code? | Source Code Definition & Meaning

Failure to pay attention to your source code can have very serious consequences.  I can tell you story after story about this.  The financial consequences ranged from a few thousand dollars to in excess of well over $100,000.  Here is one of them:

  • ABC, Inc. had a programmer named “Joe.”  Joe worked as an employee for ABC for many years.  One day he went into business for himself and was hired back into ABC as a contractor where he continued to work for several years.  When Joe left ABC, he demanded $200,000 for his ownership of the program.

  • ABC was shocked. But after consulting with their attorney, they paid Joe over $100,000 for the program that they had paid Joe hundreds of thousands of dollars to write in the first place.  In many states, the outside programmer can claim rights to all or part of the work depending on many variables.

  • Where did they go wrong?  They failed to have Joe sign over any copyright claims before allowing him to resume work as a contractor.


You should be able to answer “yes” to the following questions:

  • Do you have the source code in your possession?  All of your source code?

  • Do you know how to compile that source code?

  • Do you have a written ownership agreement with any independent contractors who may have worked on your program?

  • Are you certain that your programmers always update your copy of the source code?


Common issues with source code:

  • Programmer keeps the latest source code on his laptop.

  • Programmer claims ownership of part of or all of the source code.

  • Programmer makes some changes to the source code on his laptop and some on your server.


Source code: How you can be sure that you always have the latest source code?

  • You should regularly ask your programmer to generate the latest executable (.exe) from source code that resides on your computer, not his laptop.  If he works off site, ask him to put the latest source code on your computer every time there is a change.

  • Ask him to show you how to generate the executable.  Doing this is a relatively simple process in any language. An example for Visual FoxPro programs:

  • open Visual FoxPro
  • when the command window opens, “set default to mydrive”
  • then “modify project myprogram.pjx”
  • then build the project, but with an exe named “myprogramtest.exe”

  • If you keep a list in chronological order of the changes made, you can check to see if you have the latest version by testing the last few changes.

  • You will need him to walk you through the above steps.

  • Ask him to write a program that can automatically do the steps above.  It will look like this:

    • open Visual FoxPro
    • in the command window “do compilemyprogram.prg”
    • in the command window “do compilemyprogram.prg”
    • this program will contain two lines of code:
      • set default to mydrive
      • BUILD EXE myprogramtest FROM myproject.pjx

  • You can then run myprogramtest.exe.

  • Finally, be sure you have copies of your source code off site as well as “in the cloud”.  Dropbox.com is an excellent place for cloud storage.  Zip up the source code and password protect it.  Winzip.com is an excellent tool.

All of this may seem “too technical” for you.  But if you ever lose your source code, you will be facing a real disaster.

If you need help with FoxPro or Visual FoxPro, contact us.


Indexing or Reindexing

  • Did your programmer create the index files or index tags manually?

  • Is there a standalone reindex program?

  • Does it issue the “reindex” or the command “delete tag all” followed by “index on fieldname tag “fieldname”?

  • Does it check for a corrupted index first?  If so, does it erase the bad index and then create a new one?

  • How often do you reindex?


Backing up

  • How often do you backup?

  • Where do you backup?

  • Do you ever try to restore your backup to be sure you have a good backup?


Backing up your programmer

  • Is your programmer with a company that can back him/her up?

  • How long would it take you to get help if he/she were not available?

  • Finding a replacement is getting very difficult and very expensive.

  • You may not be able to find a replacement in time to save your business.

  • Finding a good custom programmer (not as easy as some think).

  • Should I hire an individual or a company?

  • Should I look for a fixed price?  Or just pay hourly?

  • How much time should I devote to following the progress of the programming?