Data.DB.TField.AsAnsiString

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property AsAnsiString: AnsiString read GetAsAnsiString write SetAsAnsiString;

C++

__property System::AnsiString AsAnsiString = {read=GetAsAnsiString, write=SetAsAnsiString};

Properties

Type Visibility Source Unit Parent
property public
Data.DB.pas
Data.DB.hpp
Data.DB TField

Description

Represents the field's value as an AnsiString.

Reading the AsAnsiString property returns the abbreviated class name of the field component. 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 AsAnsiString property raises an exception.

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

See Also

Code Examples