IndexType

<< Click to Display Table of Contents >>

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

IndexType

Declaration

function IndexType: Integer;

Description

Gets the current index or Tag type.

Return Value

An integer identifying the index (or Tag) type. This will be one of the following defined constants:

 

 INDEX_STANDARD    1

 INDEX_STANDARD_UNIQUE  2

 INDEX_CONDITIONAL    3

 INDEX_CONDITIONAL_UNIQUE  4

Delphi Example

// close and kill index if its a conditional index

with ApTbl do

begin

 if IndexType = INDEX_CONDITIONAL then

 begin 

         sIndexName := IndexFileName( IndexOrd ); 

         IndexClose; 

         DeleteFile( sIndexName ); 

 end; 

 iRet := SetOrder( iMasterIndex ); 

end;

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

IndexKey, IndexFileName