General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only