RAD Studio VCL Reference
|
Specifies whether to treat numeric fields as floating-point or BCD.
property EnableBCD: Boolean;
__property Boolean EnableBCD;
Use the EnableBCD property to specify how fields are mapped to field classes. If EnableBCD is true, (the default value) adDecimal and adNumeric fields are mapped to the TBCDField class when field objects are created. If EnableBCD is false, the fields are mapped to the TFloatField class.
EnableBCD determines whether numeric and decimal fields are translated as floating-point values or binary coded decimal (BCD) values. BCD values eliminate the rounding errors associated with floating point math (such as a 3 * (2/3) resulting in 2.00000000001).
If persistent field objects are used (such as those created using the Fields Editor), the field class associated with a given field can contradict the setting of EnableBCD. Three numeric fields in the same table could, for instance, each be represented by a TFloatField, a TBCDField, and a TVariantField – regardless of the value in EnableBCD. Select field classes on a field-by-field basis for greater flexibility.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|