Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Validate Database in Runtime
Message
From
26/02/1999 10:40:48
 
 
To
25/02/1999 19:57:17
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00191713
Message ID:
00191934
Views:
25
Hi Whitney.

>I have a user with tables that don't match the information in the database.

This is likely caused by one of a few things, all of which should be avoided:

- restoring the tables from a backup after structural changes were made
- copying older tables with a different structure over the newer ones
- making structural changes at your site and sending them the DBC and expecting that somehow you'll be able to make the same changes at their site

> I would like send him a small app that would run the VALIDATE DATABASE command with RECOVER. But when RECOVER is used in runtime, the error message "Command Only Available In Interactive Mode" is returned. Is there a another way to clean up a corrupted database in runtime, or will I have to get a copy of his data and VALIDATE it in my developer version of VFP5.

As you've noted, VALIDATE DATABASE RECOVER can't be used at a client site unless they have a copy of VFP. So, yes, they'd have to send you the files and you could use this command. However, don't: an ever bigger problem is that VALIDATE DATABASE RECOVER won't fix the problem. When it comes across a table that's out of sync with the DBC, it presents a dialog with two options: "cancel" (which I refer to as the "leave me hosed" option) and "delete" (which I like to call the "hose me worse than I already am" option). It's "solution" to an out of sync situation is to remove the table from the database, which means you lose long field names (and corrupt any indexes based on those long names), default values, rules, triggers, etc. for that table.

OK, that's a long lead-in for the real solution <g>: use Stonefield Database Toolkit (SDT) to handle this. It will read the physical structure of the table, compare it to the structure as defined in the DBC and some other meta data, and if the two are out of sync, will modify the table structure to match the correct definition.

SDT will do other things, too: recreate corrupted indexes, repair corrupted table and memo headers, and lots of other database management tasks. For more information on SDT, check out the Stonefield Web site.

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform