Cyrus,
You can get SDT to help manage these types of problems. A while back, Bill posted a solution, which consists of storing an empty .CDX file for each table, inside of a memo field. When you have index corruption, you simply copy over the bad .CDX file with a good empty one, and REINDEX. These empty CDX files can also be stored in another subdirectory, if you don't want to bother with putting them in a memo field.
Here's Bill code:
Re: Single Pass Reindexing Thread #
505581 Message #
505851 >The Error 114 which is "Index Does Not match table, delete index.." is sort of a Chicken and Egg problem.
>
>If I delete the .CDX file first, then I can't open the FILE, since vfp will issue the error: "Can't find CDX file".
>
>If I try to OPEN the file first, so that I can issue the command DELETE TAG ALL, I still have the error 114, when I try to open the file!
>
>The following code of course works when the INDEX is NOT corrupted. But, it is worthless when the INDEX does not match...
>
>USE session_mgr EXCLUSIVE && I get the error here and can't open the file.
>DELETE TAG ALL
>ERASE (p_data + '\session_mgr.cdx')
>INDEX ON STATION TAG STATION COLLATE 'MACHINE'
>USE
>
>Any suggestions ?
Steve Gibson