IndexClose

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods >

IndexClose

Declaration

procedure IndexClose;

Description

Closes the current index file. If this is a compound index, the effect is the same as CloseIndexes.

image\tip.gif NOTE: All index files listed in the ExtraIndexes list will be opened automatically when the table is opened and closed when the table is closed.

Delphi Example

// Close and kill index if its a conditional index

if ApTbl.IndexType = INDEX_CONDITIONAL then

begin

 sIndexName := ApTbl.IndexFileName( ApTbl.IndexOrd ); 

 ApTbl.IndexClose;

 DeleteFile( sIndexName ); 

end;

bRet := ApTbl.SetOrder( iMasterIndex );

C++Builder Example

// Close and kill index if its a conditional index

if (ApTbl->IndexType() == INDEX_CONDITIONAL)

{

 sIndexName = ApTbl->IndexFileName( ApTbl->IndexOrd() ); 

 ApTbl->IndexClose();

 DeleteFile( sIndexName ); 

}

bRet = ApTbl->SetOrder( iMasterIndex );

See Also

CloseIndexes, ExtraIndexes