Link to home
Start Free TrialLog in
Avatar of ddp1960
ddp1960

asked on

Foxpro VP 6 Packing

Hello we have a Visual Foxpro application we wrote in house years ago for managing inventory and customers, work tickets. It serves us well, but we have not done any maintenance for at least 5 years.
There are about 6 main table ranging in size up to 15MB.
I have noticed at least once where a report brings up no data for a specific part, however have verified that the part does show on the work ticket.

So my thoughts are that we probably need to re index and pack.

I have been trying to find someone to come in and do this but the one programmer I found could find his way around but was not real familiar with Foxpro. I kept saying I wanted to reindex the tables but he said Foxpro would do this automatically. Later I read about Pack and Index commands.
I think this is a simple process, basically running some commands on the tables and then copy them back to the server directory. Correct me if I am wrong.

So I have come to the experts!

Looking for some simple direction on what I need to do to do this.
Should I index? What is the process?
Should I pack? What is the process?
Anything else I need to do for maintenance?
Anything I need to be cautious of other than the usual make backup first etc?

Is there a program I can buy that would take care of this for me? I have seen various programs for fixing tables etc. but I am not sure if they would be of any benefit.

I am ussuming that once I have run the pack and index process once I will be comfortable with it.

Any experts on Foxpro in Vancouver BC?

Thanks
Doug
ASKER CERTIFIED SOLUTION
Avatar of Cyril Joudieh
Cyril Joudieh
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In my application, I have it check for damaged tables and prompt the user to fix the damaged tables or just to reindex.

There is also a checker for each invoice, receipt, order, ..., if the header record matches the child totals.
Avatar of ddp1960
ddp1960

ASKER

Thanks everyone for the help!
So I have been looking at the report file, it pulls data from 3 tables. I could not see anything wrong or different on the inventory item which did not print. So I reindexed the main table, no effect then I reindexed the next table and yahoo, the report runs properly now.

So, this generates a few more questions in order to finish my problem.

1) should I reindex all of the tables?

2) The old laptop we have FoxPro running on has VPF 7.0 SP1, I would like to run it on a new laptop, however I can find several copies of VFP6 CD's, but haven't found the box of VFP7 cd's yet. So I am stuck running it on the old laptop which I can't set the time on because the user we are using doesn't have rights to set the correct time, and there is a bios password which we can't remember. Well that's another project, cheapest solution is find or buy a new license and load on a new laptop. Should I buy VFP9 ? is there a update process I need to do to our data?

3) So for now I am copying the directory off the server and then coying the files back to the server after reindexed. Can I just copy the dbf file back or do I need to copy the .CDX file also? Any other files?

Thanks
Doug
From my experience, it is best if you reindex right after you copy files from one computer to the other. Also it is healthy to reindex on a periodic basis (week, month, quarter) the whole database.

It seems that there was a computer crash or power failure to cause that index damage.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddp1960

ASKER

Thanks for all the help.
So I ran a test offline and it worked fine.
Then  I ran the index on all of the dbf that had related CDX index files from the server.
The report runs properly now.
I was able to reset the Bios password, so that is fixed.
We are going to look at upgrading to VFP 9.
Now I have to allocate points, I will try to be fair, now I realize difficulty with putting too many questions in one post.
Thanks
Doug