GetTrimString

<< Click to Display Table of Contents >>

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

GetTrimString

Declaration

function GetTrimString( sFieldName: String ): String;

Description

Extracts the contents of any field as a string and trim trailing spaces.

Parameters

sFieldName: The name of the field.

Return Value

The field contents are returned as a string with trailing spaces removed.

 

This is the function to use when loading an edit control (i.e., DBEdit box). Trailing spaces are invisible to the user and an edit control that has a defined data entry length becomes difficult to edit when it is full of white space to the right of the data.

Delphi Example

// Display first and last names into formatted string (LAST, FIRST)

Label1.Caption := ApTbl.GetTrimString( 'LAST' ) + ', ' + ApTbl.GetTrimString( 'FIRST' );

C++Builder Example

// Display first and last names into formatted string (LAST, FIRST) }

Label1->Caption = ApTbl->GetTrimString( "LAST" ) + ", " + ApTbl->GetTrimString( "FIRST" );

See Also

GetString, GetBinary, GetBlob