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

Easy Newbie question about ReIndex 1

Status
Not open for further replies.

ChrisOjeda

Programmer
Apr 16, 2003
45
0
0
US
Hi,

My company has a Visual Fox Pro application that was built by a consulting firm year ago. Over the last several months reports have began to take longer and longer. They left no documentation unfortunately.

Anyhow, they had a small built in database utility window that has the following three actions listed as check boxes, Pack, Pack Memo, and Reindex. Then in a list box you can select files.

After backing up the data, I selected various files and performed a Pack, Pack Memo, and then Reindex. However, when I clicked the execute button it said it was completed literally only 1 second later. This makes me wonder if anything happend. How can I tell whether or not files were actually indexed and packed? I though of checking for various file extensions (not sure which ones) and looking at the modified dates?

I am totally new to Visual Fox Pro so any help would be great!!!


 
You would be able to tell if the tables or indexes were updated by checking the timestamp. But, if it took only one second, probably not. (The files would be *.DBF, *.CDX, *.IDX, *.FPT)
You must have exclusive use of the files to perform any of those functions though, so if anyone else was using the files at the time those procedures would fail.
Make sure you're the only one with the files open and try it again.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Dave... Thanks for you help.

I won't be able to check this out till late tonight. I have a feeling that this did not work.

In the event that the database utilities do not work I believe my only other option is to install the Visual Fox Pro application and use it's console to accomplish this manually (until I can create an automated routine)?

I have a few questions if I take this approach:
1) How do I know what version of VFP the database objects were made in?
2) Are all newer versions of VFP compatible with past version in regards to the Pack, Pack Memo, and Reindex?

Thanks again for the help... Chris
 
From my experience: with small tables and a small number of tables the reindex/pack functions can be VERY fast. So it's definitely possible that everything worked correctly.

Jim
 
Jim,

I agree with your statement. However, since ChrisOjeda said they have been taking longer and longer, one would think that the tables are growing. Even relatively small tables would probably take more than a second or two when you take all of the aforementioned steps.

ChrisOjeda,
The only real big differences came between FoxPro and Visual Foxpro. So as long as the app was made using VFP, you shouldn't have to worry about a particular version when dealing with the tables.
But again, make sure the PC performing the pack/reindex is the only PC which has the tables open when you try it. That will ensure you have exclusive use of the tables and the routines won't error out. You will have to have exclusive use of the tables anyway if you are to perform that sort of maintenance on them using VFP instead of the built-in routines.


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top