Subject | Re: [IBO] Still Formatting problems |
---|---|
Author | Luiz Alves |
Post date | 2001-08-06T21:34:21Z |
>>Is there a way to change a field from floating-point to numeric(12,2) ?
1. Create a new field(temp) as numeric(12,2);
2. Copy the values in the double field to temp using "update field....."
3. Drop the column containing double values
4. Create a new field with the same name that column dropped in (3) as
numeric(12,2)
5. Import data from temp to column created in (4)
6. Drop temp column
Luiz.
----- Original Message -----
From: "Leeway" <lee@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, August 06, 2001 9:40 AM
Subject: Re: [IBO] Still Formatting problems
I took your advice and made a domain with numeric(12,2)
B.T.W. I work with QuickDesk
When I change the floating-point field in QuickDesk to this domain I
get the following error
unsuccessful metadata update.
Cannot change datatype for EP_VAT. Conversion from base type DOUBLE
PRECISION to 64-bit numeric is not supported.
When I change the floating-point field directly, not with a domain It
works, but instead of changing to a Numeric(12,2) field it changes to
a double-precision field.
Is there a way to change a field from floating-point to numeric
(12,2) ?
--- In IBObjects@y..., Svein Erling Tysvær
<svein.erling.tysvaer@k...> wrote:
> Lee,
> I think this behaviour is correct for a floating point field. You
set the
> display to 2 digits after the decimal point, but when you are
editing you
> generally want to edit the exact value. If you want the field to
contain a
> specific number of digits after the decimal point, then using a
floating
> point field is not appropriate. Follow Jasons and Luiz advice and
use a
> scaled numeric.
>
> Set
>
> >I have a floating point field.
> >I use a TIB_Edit component to display and input data.
> >I want the users to see and enter data with maximum two digits
after
> >the decimal point.
> >The display part I can manage using
> >IB_Query.Fieldsdisplayformat '#,###,##0.00'
> >But when the user tabs into the IB_Edit component the display goes
> >from 15.45 to 15.4499998092651
> >when the user tabs out of the IB_Edit the display goes back to
15.45
> >how do I fix this ?
> >If I have to use a mask, how do I do that, and what is the mask ?
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/