KeyData

<< Click to Display Table of Contents >>

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

KeyData

Declaration

function KeyData: String;

Description

Extracts the key data from the current index key in the current index and returns it as a string.

Return Value

Numeric keys return a string representation of the number to four decimal places. Logical keys return 'T' or 'F'. Date key return values differ according to the index type. NTX dates are returned as a string in CCYYMMDD format. IDX/CDX/NSX dates are returned as a string representation of the Julian date (see GetDateJulian) - unless they have been turned into strings with DTOS().

Delphi Example

with ApTbl do

begin

 Open; 

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

 GoTop; 

 Edit1.Text := KeyData; // Contains 'AKANCHORAGE '

end;

C++Builder Example

ApTbl->Open();

ApTbl->Index( "test.idx", "upper(STATE+CITY)", IDX_NONE, false, "" );

ApTbl->GoTop();

Edit1->Text = ApTbl->KeyData(); // Contains "AKANCHORAGE "

See Also

IndexKey