Subject Re: [IBO] Re: Again... Problem with Numeric and TIBOTable
Author helton_o
Thanks for your help...

Unfortunately i'm working with a payroll application wich must be
precise with large currency values. I tried "AsCurrency" with the
same result.

Is there some "workaround" for this problem ? What Jason said about
this ?

Regards,

Helton

----- Original Message -----
From: "mmenaz" <mmenaz@...>
To: <IBObjects@yahoogroups.com>
Sent: Quinta-feira, 27 de Dezembro de 2001 11:08
Subject: [IBO] Re: Again... Problem with Numeric and TIBOTable


> I think you are fighting with a "bug" of IBO, about what we have
time ago
discussed with Jason and Geoff Worboys.
> Internally IBO uses a weak solution to scale the value to an
integer, so
since it multiplies the value for a power of 10 related to the number
of
decimal, and all this is done with currency type, it goes "out of
range". If
you don't need currency precision, since you are using
them "AsFloat", try
to define the column as "double" or something like this (I don't use
such a
type of fields, usually, so I don't remember the syntax).
> Hope this will help (I'm in a hurry now, so sorry if I could not be
more
precise).
> Regards
> Marco Menardi
>
>
> --- In IBObjects@y..., "helton_o" <helton_o@t...> wrote:
> > Hi,
> >
> > I have the follow table in a IB database:
> >
> > CREATE TABLE Formulas
> > (
> > CodFormula SMALLINT NOT NULL ,
> > DscFormula VARCHAR(15) NOT NULL ,
> > CodVctoDesc SMALLINT NOT NULL ,
> > Formula VARCHAR(150) NOT NULL ,
> > Piso NUMERIC(18,2) DEFAULT 0 NOT NULL ,
> > Teto NUMERIC(18,2) NOT NULL
> > );
> >
> > When i try to assign a value to the field "Teto"

> > tblFormulasTeto.AsFloat
> > := 999999999.99; ) i receive an error message "Invalid floating
point
> > operation", if i try to assign the value 899999999.99 it works
fine.
> >
> > I'm using a TIBOTable and Dialect 3.
> >
> > Any sugestions ?
> >
> > Helton