Subject Re: [IBO] Can't save correct values into Numeric Field
Author Helen Borrie
At 03:34 AM 26-09-01 +0000, you wrote:
>I have a problem saving numeric values into my Interbase database
>using IBO. When I save a value to a field it always saves the value
>as 0.2
>The field in question is defined in the table as Decimal (11,2) and in
>Delphi as a TIBOBCDField with precision of 0 and a size of 8.

You should set its precision to 2 to match what you want to store.

>I have been looking for a solution on the IBO web page and can't find
>one. At first I thought that it was because I was using a TBCDField
>in the persistent fields but after the change to TIBOBCDField the
>error was still occurring.

Did you delete the old instance of the persistent field and then recreate it?

>In the program I am using the TIBOTable for database access and have
>attempted to change the value in the field in code and by using data
>aware controls. Using the IB_Monitor dialog it appears that the DBMS
>is having the value of 0.2 sent to it.

If you are certain of this, would you cook up a small demo project, zip it up and send it through to me? Just send the demo project source and the DDL for the table, not a database.

>I am using Delphi 4.03 professional, latest trial version of IBO (v3), Interbase 6
>and WinNT 4 sp6a.

Also please indicate which version of ib 6 and which dialect you are using.


All for Open and Open for All
InterBase Developer Initiative ยท