Subject | Re: Problem with IBO 4.2Fb in Numeric Field |
---|---|
Author | sassicaia70@hotmail.com |
Post date | 2001-11-06T11:18:17Z |
After I modify this table with IB_Expert with 4 deciamal scale and
after with 3 scale
Now the calculation is correct !!!
Why ??
Which difference there are when modify the table with IB_EXPERT
The first time I have create the database with Interactive SQL
FireBird 1.0.0.338 Beta 2
Which are the best create database program ??
Thanks
Roberto Govoni
after with 3 scale
Now the calculation is correct !!!
Why ??
Which difference there are when modify the table with IB_EXPERT
The first time I have create the database with Interactive SQL
FireBird 1.0.0.338 Beta 2
Which are the best create database program ??
Thanks
Roberto Govoni
--- In IBObjects@y..., sassicaia70@h... wrote:
> I have a problem with IBO 4.2Fb.
> I use IBOTable with Pessimistic Lock.
>
> Database:
>
> /* Original table name is "Rigapeso.DBF" */
> CREATE TABLE "RIGAPESO" (
> "ID" INTEGER NOT NULL PRIMARY KEY,
> "PNETTORIGA" NUMERIC(18, 3) DEFAULT '0' /* "PNETTORIGA" */ ,
> "PLORDORIGA" NUMERIC(18, 3) DEFAULT '0' /* "PLORDORIGA" */ ,
> "PTARARIGA" NUMERIC(18, 3) DEFAULT '0' /* "PTARARIGA" */ ,
> "PPEZZIRIGA" NUMERIC(10, 0) DEFAULT '0' /* "PPEZZIRIGA" */ ,
> "PCARTRIGA" NUMERIC(10, 0) DEFAULT '0' /* "PCARTRIGA" */ ,
> "PPALLRIGA" NUMERIC(10, 0) DEFAULT '0' /* "PPALLRIGA" */ ,
> "PIMPRIGA" NUMERIC(18, 3) DEFAULT '0' /* "PIMPRIGA" */
> );
>
>
> Source:
>
> with IBOTable1 do begin
> Open;
> Edit;
> FieldByName('PNETTORIGA').AsCurrency := 0;
> Post;
> //
> Edit;
> FieldByName('PNETTORIGA').AsCurrency := 2.059;
> Post;
> //
> Edit;
> FieldByName('PNETTORIGA').AsCurrency :=
> FieldByName('PNETTORIGA').AsCurrency + 3.733;
> Post;
> //
> //
> // the result : FieldByName('PNETTORIGA').AsCurrency is 5.791
> //
> // But the correct result is 5.792
> //
> //
> end;
>
>
> Why ??
> How can solve this problem ??
>
>
> P.S.
>
>
> Thanks very much
>
> Roberto Govoni