===================================================
lsTableRepair component - by L&S Software
===================================================

The lsTableRepair is a Paradox table repair component. Just drop in on form,
assign a DatabaseName (or directory) and a TableName (in design-time or
run-time) and execute the Rebuild method. It needs the tutil32.dll file 
(*not* included in this zip file).

------------------------------------------
Properties, methods and events of interest
------------------------------------------

types
-----
  TVerifyResult = (vrUnsuccessful,vrNoErrors,vrCompleted,vrNotCompleted,
                   vrManualRebuild,vrCannotRebuild);

  TRebuildResult = (rrSucessful,rrUnsucessful,rrCannotFillStructure);

  TProgressType = (ptUnknown,ptHeader,ptIndex,ptData,ptBuild);

  TProgressRepairEvent = procedure(Sender : TObject; ProgressType : TProgressType;
        APosition : integer) of object;

methods
-------
*) function Verify : boolean;
      This method verifies the table state. It's more useful use the Rebuild method
instead, once it verifies and rebuilds the table if there are errors. It returns
false if there are problems with the verification, and the property VerifyResult
holds the error type.

*) function Rebuild : boolean;
      Use this method to verify and rebuild the table. It returns false if there are
problems with the rebuild, and the property RebuildResult holds the error type.

properties
----------
*) property VerifyResult : TVerifyResult;
      Read this property after a non-sucessful call to the verify method. The 
TVerifyResult type is declared above.

*) property RebuildResult : TRebuildResult read FRebuildResult;
      Read this property after a non-sucessful call to the rebuild method. The
TRebuildResult type is declared above.

*) property ProgressHeader : TProgressBar;
      You can assign a Delphi TProgressBar component or descendant to this property
to have a callback of the header verify and rebuild progress.      

*) property ProgressIndex : TProgressBar;
      You can assign a Delphi TProgressBar component or descendant to this property
to have a callback of the index verify and rebuild progress.      

*) property ProgressData : TProgressBar;
      You can assign a Delphi TProgressBar component or descendant to this property
to have a callback of the data verify and rebuild progress.      

*) property ProgressBuild : TProgressBar read FProgressBuild write SetProgressBuild;
      You can assign a Delphi TProgressBar component or descendant to this property
to have a callback of the error verify and rebuild progress.      

*) property TableName : TFileName;
      Just assign a string to this property containg the table name. Note it needs
the '.DB' extension.

*) property DatabaseName : string;
      Assign a database name to this property or a path to a .db file.

event
-----
*) property OnProgress : TProgressRepairEvent;
  TProgressRepairEvent = procedure(Sender : TObject; ProgressType : TProgressType;
        APosition : integer) of object;
      If you don't want to use the TProgressBar component to have a callback of the
rebuild progress, you can attach code to this event to handle the callback. The
ProgressType holds the type of progress in execution (header, index, data or build),
and the APosition holds the percent done (from 0 to 100).

----------
installing
----------
Decompress all the files in a directory. Copy the
TUtil32.Dll file to your Windows directory, or it will not work.
Choose the option Component|Install component in the
Delphi menu. Click in the Browse button and select the 
lsTableRepair.DCU file in the directory. The component will be
installed in the L&S pallete. If you have problem with the .dcr 
file, just remove the {$R 'lsTableRepair.dcr'} declare in the
package source file.

---------
copyright 
---------
This component is freeware, and you can use it free in your
applications. You can distribute this component, but only in the
original form, with all the files, including the readme.txt file.

The source code of this component is free. You can request the
source code by e-mail:

chipds@bbs2.sul.com.br

Visit my little Delphi page at:
bbs2.sul.com.br/chipds/delphi