Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reset table cdx flag
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00400995
Message ID:
00401138
Views:
27
>What happens if the cdx is damaged bad enought to prevent the table from being opened? You eather have to run some type of fix program or simple delete its cdx file, open the table back up, and then rebuild the indexes. When going the secound route, opening the table triggers an error message notifing you that the cdx file is missing. If you click ignore Foxpro resets the cdx flag in the table header record. How can you reset this flag without opening the table?
>
>Dave

Sounds like you're hitting error 114. Is the data on a Novell network?

Anyway, probably a better way to handle this is to trap for errors 114 and 1707. When 114 occurs, delete the index file and re-try the command. That'll trip 1707 simply ignore it and retry. This will open the table. When you try to set the order, error 26 should occur and you can then re-build the index. While this may seem like a long way around, to me it would be better to do the error handling (since VFP itself will clean up the problem) then to risk possibly corrupting the entire table.

If you do choose to go to modifying the table header, however, do a bitwise and (BITAND()) on byte 28 (zero offset) with 254. Do not try to subtract! Ed told you where to find the information you need.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform