From RAD Studio API Documentation
Jump to: navigation, search


property AsString: string read GetAsString write SetAsString;


__property System::UnicodeString AsString = {read=GetAsString, write=SetAsString};


Type Visibility Source Unit Parent
property public
Data.DB TField


Represents the field's value as a string (Delphi) or an AnsiString (C++).

Reading the AsString property returns the abbreviated class name of the field component enclosed in parentheses. The abbreviated class name is built by stripping the leading 'T' from the class name and removing the trailing word 'FIELD', except in the case of TField where that would leave an empty string. Thus, the abbreviated class name of TField is "FIELD", the abbreviated class name of TVarBytesField is "VarBytes", and so on.

Trying to set the AsString property raises an exception.

Descendants of TField that represent string fields or that support conversions between the field's Value property and a string override AsString to read and write the value of the field as a different, more meaningful, string.

See Also

Code Examples