Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database maintenance options
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00259275
Message ID:
00259418
Views:
19
>>>>I am making a database and table maintenance class that has buttons for PACK, RECALL ALL, and REINDEX, and whatever else I might need. I thought I would add a button that does "Clean Up Database" and VALIDATE DATABASE. As I recall, the "Clean Up Database" pad from the Database menu does the same as:
>>>>
>>>>USE mydatabase.dbc EXCLUSIVE
>>>>SELECT mydatabase
>>>>PACK
>>>>
>>>>Is that the right code?
>>>>
>>>>So what else do I need to put in this thing?
>>>
>>>Be aware that VALIDATE DATABASE is not available outside the VFP environment...
>>
>>...and the RECOVER option is not available in code, only from the Command Window.
>The vfp6 help confirms what you say about the RECOVER clause. It doesn't confirm what Eric said about the command itself, but I can believe that he's right.
>
>I don't know if VALIDATE DATABASE would even be a good command to make available to users, if Eric were wrong. I'm open to suggestions about what are good maintenance options to provide users in a very light-duty environment.

The only thing I give my users is PACK, a reindexing routine, and a utility that attempts to repair corrupted tables. You should also look into a tool that will reindex intelligently by destroying the existing tags and recreating them from scratch. This allows the indexes to be rebuilt successfully even if te CDX header is corrupted.

You shouldn't need to give users utilities like VALIDATE and "Cleanup Database" because these options are only needed when a database's is being actively altered regularly. After a database is deployed, it's structure should be relatively stables, and you won't have the need to clean it up.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform