RYOKeyDrop

<< Click to Display Table of Contents >>

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

RYOKeyDrop

Declaration

function RYOKeyDrop ( sTagName : String ) : WordBool;

Description

Drops a key from an existing sxChar RYO index tag that points to the current table record.

Parameters

sTagName: The name of the index tag containing the sxChar index. If passed as NULL, the current tag is used.

Return Value

True or False depending on the outcome of the operation.

Delphi Example

with ApTbl do

begin

 Open; 

 

 // Create an RYO index tag that accepts any 3-byte key value

 IndexTag( '', 'CUST_CODE', 'sxChar(3)', IDX_EMPTY, False, '' ); 

 SetOrder( 0 ); 

 GoTop; 

 

 // Add a key for the current record

 if RYOKeyAdd( 'CUST_CODE', 'VIP' ) then 

         ShowMessage( 'VIP Customer Code Key added successfully.' ) 

 else 

         ShowMessage( 'Key add failed!' ); 

 

 // Drop the key for the current record

 if KeyDrop( 'CUST_CODE' ) then

         ShowMessage( 'Key removed successfully.' ) 

 else 

         ShowMessage( 'Key drop failed!' ); 

end;

See Also

RYOKeyAdd, KeyDrop, sxChar xBase function