Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can CDX Reference be Removed without Opening Table?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00356049
Message ID:
00356329
Views:
11
>>Is there a way to remove the CDX reference from a table if the CDX file is missing, without opening the table? I need a way to rebuild a missing index, and opening the table generates an error.
>>
>>Thanks!
>>
>>Michael Reynolds
>
>The header layout for a dbf file is detailed in the help under "File structure". It tells you that byte 28 in the header contains the association options. You can alter this byte with a hex editor or with low level file commands to dissaciate the cdx from the table. See the help file.

Thanks! That worked very well. It was simple to write a short routine to rewrite the table. If the CDX is missing, byte 28 is simply changed to zero(0), unless it has a memo file, which would make it 2. Then, the table can be opened without errors, to rebuild the index.

This makes it possible to get around some people who might like to delete files as an experiment. Next, I'll need to find a work-around for people who choose to delete the EXE. :)

Michael
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform