<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > CloseIndexes |
Declaration
procedure CloseIndexes;
Description
Closes all open index files attached to the current table object.
Delphi Example
// Close indexes before appending from a large file. This will speed up the operation and we can reindex later.
with ApTbl do
begin
CloseIndexes;
SetGaugeHook( Form1.Handle );
iGaugeFiles := 1; { Global to set gauge proportion }
if AppendFrom( 'c:\Apollo\Data\cust.dbf', SDENTX, '' ) then
ShowMessage( 'Appended file successfully' )
else
begin
ShowMessage( 'AppendFrom failed' );
Exit;
end;
{Rebuild indexes}
iIndex1 := IndexOpen( 'c:\Apollo\Data\names.ntx' );
iIndex2 := IndexOpen( 'c:\Apollo\Data\custid.ntx' );
iGaugeFiles := 2;
Reindex;
SetGaugeHook( 0 );
end;
See Also