Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DBF and CDX files from different times
Message
From
19/07/2005 16:58:28
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
19/07/2005 16:36:09
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01034017
Message ID:
01034026
Views:
31
>What are the dangers of taking just the DBF from one directory and copying it into another directory with the same named DBF and the associated CDX file?

The CDX may be completely off-base... it may contain keys to nonexistent records, or keys that were changed. Fox may or may not detect this when it opens the file - depending on how different they are and also on version. Newer versions of Fox are stricter with this.

You may see any number of errors - record is out of range would be the most common, but a C0000005 wouldn't surprise me, either.

However, if all the keys in the cdx are based on the fields which do exist in the newly copied table, open it exclusively, reindex and you should have an usable index. OF course, if any key() expression can't be eval()uated, you'll receive a "variable not found" or some such error as soon as you try to Set Order to that tag, or maybe as soon as you open the table.

If the table is in a DBC, and you copy it over a table with not identical structure, best of luck with Validate Database Recover... which works most of the time.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform