Descend

<< Click to Display Table of Contents >>

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

Descend

Declaration

function Descend( sKeyString: String ): String ;

Description

Converts a key string into a 2s complement representation for use in seeking on an .NTX index built with the DESCEND xBase function.

 

image\tip.gif To support legacy DOS application set OEMTranslate to True.

Parameters

sKeyString: The search string you wish to convert into its descending form.

Return Value

The passed search key is returned as a string in 2s complement form. If an NTX index has been built using the DESCEND xBase function, a key for use with Seek must be converted before the search takes place.

Delphi Example

// index is in descending sequence so we will invert when seeking

sRecStr := Edit1.Text;

if sRecStr = '' then

 Exit; 

cRecStr := UpperCase( sRecStr );

 

if ApTbl.Seek( ApTbl.Descend( cRecStr )) then

 ShowMessage( 'Key found' ) 

else

 ShowMessage( 'Key not found' ); 

See Also

Seek, SetSoftSeek