Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stonefield or FoxFix?
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00532779
Message ID:
00532843
Views:
21
>Obviously, the Stonefield Database Kit does a lot more, so it is more desirable, but is the data corruption capability as good as FoxFix?

I have both for reasons you will soon read below. Direct from the SDT Documentation:

As you no doubt have experienced first hand, table and memo headers can become corrupted when workstations or file servers crash (among other reasons). There are a number of excellent tools on the market, such as dSALVAGE, that can correct almost any kind of file damage, including table headers. However:

· These tools are intended for developers only. An inexperienced user can easily cause more damage to a file using these tools, and most users would find them too intimidating to use anyway.

· You need to purchase and install a copy of these tools for every client.

· Some of these tools, such as dSALVAGE, don’t work with VFP tables.

· In our experience, 99% of the time a table gets damaged, the problem is with table and memo header corruption rather than the many possible things that can go wrong. This means these tools are overkill the vast majority of the time.

The Repair() method of SDTMgr repairs damaged tables by writing a completely new header for the table and memo file. It doesn’t take the place of other repair tools since it doesn’t resolve other types of damage. However, it can run transparently to the user and quickly resolve header problems, which, as noted above, form the vast majority of the cases of table damage.

To examine how Repair() can repair a damaged table header, simulate a workstation crash by purposely damaging a file header using the following commands:

. open database CLIENT\TESTDATA
. do CORRUPT with 'CUSTOMER'
. use CUSTOMER

Notice CUSTOMER cannot be opened since it now has an invalid header. To correct the problem, type:

. do REPAIR with 'CUSTOMER'
. use CUSTOMER

REPAIR.PRG is a “wrapper” program for the Repair() method, allowing you to repair table headers from the Command window without typing all the commands necessary to do so.

To see how Repair() can repair a damaged memo header, do the following:

. open database CLIENT\TESTDATA
. do CORRUPT with 'EMPLOYEE', .T.
. use EMPLOYEE

You’ll get a “memo file is missing or invalid” error because EMPLOYEE.FPT now has an invalid header. To correct the problem, type:

. do REPAIR with 'EMPLOYEE'
. use EMPLOYEE

Like Reindex(), Repair() can be called with several parameters. If no parameters are passed, a dialog is displayed allowing you to choose which tables to repair. If “ALL” is passed, all tables are repaired without displaying the dialog. If a single table name is passed, that table is repaired.

You can even have SDT automatically repair a table when an error occurs while trying to open it. To see how this works, do the following:

. do CORRUPT with 'CUSTOMER'
. do TESTERR

Notice that even though the CUSTOMER table has been corrupted, it is automatically repaired and then opened. Look at the code in TESTERR.PRG to see how Repair() is called from the error handler when an error occurs while trying to open a table.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform