DB.TField.AsString

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From DB.pas

	property AsString: string read GetAsString write SetAsString;


Unit: DB

Type: property

Visibility: public

Member Of: TField

C++ Information

From DB.hpp

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


Unit: DB

Type: property

Visibility: public

Member Of: TField

Description

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 Samples


Personal tools
Translations
Newest Version