Subject Re: [IBO] is 0.208 some magic value ?
Author Helen Borrie (TeamIBO)
At 07:44 PM 04-04-02 +0200, you wrote:
>I use D3, IBO3 and Firebird v. WI-T1.0.0.679
>
>1. a TIBOQuery is defined as
>
>'select * from tb_iva';
>
>2. TB_IVA is defined as
>
>SHOW TABLE tb_iva
>COD_IVA VARCHAR(5) Not Null
>ALIQ_IVA (D_PERC) NUMERIC(9, 3)
>I_E VARCHAR(1) Not Null
>DETR_NE SMALLINT Not Null
>DES_IVA VARCHAR(20) Not Null
>CONSTRAINT INTEG_42:
> Primary key (COD_IVA)
>
>3. a TDBDataSource is connected to the TIBOQuery
>
>4. a TDBGrid is connected to the TDBDataSource
>
>5. a TDBNavigator is connected to the same TDBDataSource
>
>6. if I add a new record and set ALIQ_IVA to 0, some magics corrects my
>input and set the same value to 0.208
>
>Can somebody explain this ?

I can't explain 0.208 in particular; but, as a general rule, to store an
exact value in an exact numeric, you need to give it the exact value. 0 is
not an exact value for a numeric(9,3); 0.000 is.


regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com