IndexFileName

<< Click to Display Table of Contents >>

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

IndexFileName

Declaration

function IndexFileName( iIndex: Integer ): String;

Description

Extracts the physical file name and path of the defined index.

image\tip.gif To avoid a naming conflict with the TDataSet.IndexName property, the old TApollo.IndexName method has been renamed to IndexFileName in this release. See the Delphi / C++Builder VCL help for additional information on TDataSet.IndexName.

Parameters

iIndex: An integer identifying the order that will have its file name extracted. This function may be used to enumerate the indexes attached to the current work area.

The current order number may be retrieved with IndexOrd.

Return Value

The file name is returned as a string.

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;

iRet := 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

ExtraIndexes, IndexKey, IndexOrd, IndexType, TagArea, TagName