Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Opening tables without indexes
Message
 
To
29/10/2002 07:00:49
Philip Jones
Cornwall County Council
Truro, United Kingdom
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00716369
Message ID:
00716371
Views:
17
Hi Phil

What you want to do is right (deleting the CDX is the safest thing to do)

There's a trick for overriding the message "Structural CDX file not found", based on the fact that it only shows once (after you "ignore" it once, the index reference is removed from the DBF header)

You should do something like this:
ON ERROR DO IgnoreThisError
USE MyTable EXCLUSIVE
ON ERROR
USE MyTable EXCLUSIVE
...

PROCEDURE IgnoreThisError
   RETURN
ENDIF
Hope this helps
Jose.

>Hi,
>We have some code that runs overnight which reindexes all of the tables in an application. It opens each table exclusively and issues a DELETE TAG ALL.
>It then adds each index back in again.
>Occasionaly we have problems that are caused by the fact that sometimes the whole cdx file seems to get corrupted. Deleting and restoring individual indexes does not fix the indexes and the only way to fix them is to delete the whole cdx file, open the table without it, and recreate all of the indexes.
>So.. I would like to alter the code that runs overnight to delete the entire cdx file.
>However.. If I delete a cdx file and then USE the relevant table I get a message tellnig me "Structural CDX file not found", and giving me two options "ignore" and "cancel". If I was adding the indexes back in manualy I could just click cancel, but I need my code to handle this.
>Does anyone know if there is a command I can use to open the table regardless of whether the cdx file associated with it has been celeted or not.
>
>
>Phil.
------------------
Jose Marcenaro
Tercer Planeta - Argentina
http://www.tercerplaneta.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform