Data.DB.TBCDField.Value

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Value: Currency read GetAsCurrency write SetAsCurrency;

C++

__property System::Currency Value = {read=GetAsCurrency, write=SetAsCurrency};

Properties

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

Description

Represents the value of the BCD field as a currency value.

Unlike other field types, the Value of a binary-coded decimal (BCD) field does not correspond to the physical format of the data that is stored in the underlying database table. The IDE does not have a native type for BCD. Therefore, TBCDField converts the data from a BCD value to a currency value when it fetches the data from the database table, and converts it from a currency value to a BCD value when it posts the data. For BCD fields, Value is the same as the AsCurrency property.

Note: Because TBCDField works with its data as a currency value, simply getting the value of the field and posting that value back to the database table can alter the contents of the field. That is, the line below can alter the contents of the field in the database table.



MyBCDField.Value := MyBCDField.Value;



MyBCDField->Value = MyBCDField->Value;



See Also