Subject Re: [IBO] Strange behaviour of numeric fields.
Author TeamIBO
> I am using IBO 3.6.Cc.

For future reference; If you expect a half sensible answer to you
questions you need to mention this fact. Its hard enough when
guessing between recent IBO4 releases.


> Yes, I know this is out-dated but when I upgraded to V4 some time
> ago my application became unacceptably slow.

Curious. I am guessing that you should not have that difficulty now
but I dont know the details so I could be wrong.


> Do you know where in IBO the problem lies? I might be able to
> implement a fix of my own.

I have spent many days working on the problems in IBO4, its not
something I can put into a short rely. If you have access to the IBO4
source you can look at what I have done (some utils in the
IB_Utils.pas unit, as well as changes to IB_Column.IMP and
IBODataset.PAS).

To try and put it briefly there were three main issues with
IBOs handling of numerics in the past...

* Performing scaling with multiple calls to "/ 10" rather than a
single call to "/ 100" (or whatever). Resulting in round of round
problems.

* Overflow problems resulting from scaling the currency values up
and then down to the defined scale.

* Delphi currency types being manipulated using functions with
extended datatype parameters or returns.

To the best of my ability these problems have been resolved in the
IBO4.2.Fr release.

Its been a long time since I had IBO3.6 installed so I dont know how
much else may have changed and it is difficult to guess.

Personally I dont use NUMERIC(x,y) anyway. I started my production
implementations pre IB6 (which stored numerics > 9 as doubles) and
so implemented my own explicit rounding via UDFs. It works so I have
not changed.

If you were not using TIBO* stuff I would have suggested trying an
early version of the IBO4 IB_Currency control, since it was
implemented in a way that may have assisted you.


Not sure how much this will help.

--
Geoff Worboys - TeamIBO
Telesis Computing