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 ?