<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > Reindex |
Declaration
procedure Reindex;
Description
Rebuilds all active orders attached to the current work area.
If reindexing a compound index, the DBF file must be opened for EXCLUSIVE use.
The progress of the function may be visually monitored if a gauge hook has been set with SetGaugeHook.
Delphi Example
procedure Form1.Button1Click(Sender: TObject);
begin
with ApTbl do
begin
Open;
IndexOpen( 'c:\Apollo\Data\sxcust1.ntx' );
IndexOpen( 'c:\Apollo\Data\sxcust2.ntx' );
IndexOpen( 'c:\Apollo\Data\sxcust3.ntx' );
SetGaugeHook( Form1.Handle );
iGaugeTotal := 3;
Reindex;
SetGaugeHook( 0 );
Close;
end;
end;
C++Builder Example
void __fastcall TForm1::Button1Click(TObject *Sender)
{
ApTbl->Open();
ApTbl->IndexOpen( "c:\\Apollo\\Data\\sxcust1.ntx" );
ApTbl->IndexOpen( "c:\\Apollo\\Data\\sxcust2.ntx" );
ApTbl->IndexOpen( "c:\\Apollo\\Data\\sxcust3.ntx" );
ApTbl->SetGaugeHook( int( Form1->Handle ));
iGaugeTotal = 3;
ApTbl->Reindex();
ApTbl->SetGaugeHook( 0 );
ApTbl->Close();
}
See Also