KeyDrop

<< Click to Display Table of Contents >>

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

KeyDrop

Declaration

function KeyDrop( sTagName : String ): WordBool;

Description

Deletes a key to the specified index order.

image\tip.gif This method can only be used on SDEFOX and SDENSX indexes that were created using the IDX_EMPTY constant for the iOption parameter of Index or IndexTag.

Return Value

True if the key was successfully removed, False if not.

Delphi Example

with ApTbl do

begin

 Open; 

 Index( 'test.idx', 'upper(STATE+CITY)', IDX_EMPTY, False, '' ); 

 SetOrder( 0 ); 

 GoTop; 

 

 // Add a key for the current record }

 if KeyAdd( 'test.idx' ) then 

         ShowMessage( 'Key added successfully.' ) 

 else 

         ShowMessage( 'Key add failed!' ); 

 

 // Drop the key for the current record

 if KeyDrop( 'test.idx' ) then

         ShowMessage( 'Key removed successfully.' ) 

 else 

         ShowMessage( 'Key drop failed!' ); 

end;

See Also

KeyAdd, RYOKeyDrop, Index, IndexTag