>Hi,
>
>I have not used the REINDEX command in a very long time. And I am getting a lot of problems related to the application not being able to read some .cdx files. These CDX files are part of the SFQUERY and SDT and I don't know the structure of the indexes. So, just to be sure that the problem is not with a corrupted index, I thought I would reindex these DBFs.
>I am thinking of simply executing the following command:
>
>
>use SDTMETA
>REINDEX
>
>
>And the same with a couple of other meta DBFs. Is the above safe?
REINDEX, by itself, does not fix certain types of index file corruption. IMO a better option is to overwrite the problematic CDX(s) with known good ones, either from a backup, your development environment etc even if they are out-of-date, then issue REINDEX to bring it up to date.
Another approach is to DELETE TAG ALL, then manually rebuild all the index tags. I've always been a bit wary of doing that in case it breaks any referential integrity that may have been defined in a VFP database. I find it easier just to overwrite the CDX file(s) as long as you have any sort of known good version.
My suspicion is that all this is dealing with symptoms. Something else is probably causing these file read errors, which is manifesting as problems with your CDX(s). The CDX(s) may or may not actually be bad.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up