Subject | Re: [IBO] Is CURRENCY field column attributes ignored? |
---|---|
Author | Geoff Worboys |
Post date | 2001-11-06T23:36:14Z |
Hi Marco,
AFAIK this is actually consistent with IB/FB - in that field precision
is not honoured - presumably because they have only just gotten around
to actually storing the information, and since it is not available to
the client (without lots of extra work) there is no way for IBO to
validate this properly.
error?
Please ensure that you tell us the server type and version and the
delphi/bcb version that you are using. All these factors are required
to know what to expect in a given situation with numeric/decimal
types - since the processing and storage types vary accordingly.
own displayformat or editmask then the attribute is ignored. It does
not have any impact on the value processing.
Geoff Worboys
Telesis Computing
> I've a mynum NUMERIC(15,2), defined as CURRENCY in thedigits+00).
> query. Having a look at IBA_Column.IMP i can see that
> when I edit that field in a IB_Edit and exiting the
> value is assigned to the field, it's called the code
> for a generi floating field
>
> TIB_ColumnNumeric.SetAsString(
> ...
> try
> Value := StrToFloat( tmpVal );
> except
> ...
>
> so a value like 21321545000010,00 is accepted (!!! it's 16
AFAIK this is actually consistent with IB/FB - in that field precision
is not honoured - presumably because they have only just gotten around
to actually storing the information, and since it is not available to
the client (without lots of extra work) there is no way for IBO to
validate this properly.
> But if you try to set this value to the field withWhat error and when does it occur? Do you have a callstack for the
> Field.AsCurrency := 21321545000010
> an error occurs (welcome!)
error?
Please ensure that you tell us the server type and version and the
delphi/bcb version that you are using. All these factors are required
to know what to expect in a given situation with numeric/decimal
types - since the processing and storage types vary accordingly.
> I don't understand this situation... and what's the useIt is only used to manage the default displaytext. If you have your
> of CURRENCY column attribute?
own displayformat or editmask then the attribute is ignored. It does
not have any impact on the value processing.
Geoff Worboys
Telesis Computing