Subject Re: [IBO] TIBOQuery param AsFloat strange behaviour
Author Tomasz Tyrakowski
Could anyone please confirm or deny the behaviour described below? I
don't know if it's a bug in IBO 5.9.7 (I've downgraded to 5.9.3 and
everything works fine), or if I messed something up with the
configuration (although I can't imagine what possibly could cause zeros
to be replaced by nulls)?
If it's a bug, it would be worthwhile to warn the users (setting nulls
in numeric columns instead of zeros can lead to byzantine bugs on
nullable columns; imagine doing a sum(...) over such column with a
single null record within a million). But maybe I'm just overreacting.
Anyway, a three-liner is enough to reproduce this, so please try it out
and post your conclusions.

Thanks in advance and have a good one.
Tomasz

On 04.05.2018 o 13:11, Tomasz Tyrakowski t.tyrakowski@...
[IBObjects] wrote:
> Hi,
>
> I've recently upgraded to the current (5.9.7) IBO release and was
> surprised by a strange TIBOQuery behaviour, which forced me to downgrade
> back to 5.9.3.
> In the latest release, when you do something like:
>
> query.SQL.Text := 'update T set F = :val';
> query.ParamByName('val').AsFloat := 0.0;
> query.ExecSQL;
>
> the records get updated to NULL (!!!) instead of 0. Setting any non-zero
> value works as expected (only 0 results in NULLs). Tested it also with a
> freshly created table (to exclude any triggers / other dbms factors).
> In 5.9.3 the same code works well, updates F to 0.
> Delphi 10.2.3.
>
> Could anyone please confirm experiencing similar behaviour? Or is it
> just me? Can you do a quick check with a query like above and see what
> happens?
> I discovered it the hard way, i.e. scores of customers started calling
> the help desk complaining about null check errors in the app (IBO tried
> to store nulls instead of zeros in non-null columns).
>
> regards
> Tomasz
>


--
__--==============================--__
__--== Tomasz Tyrakowski ==--__
__--== SOL-SYSTEM ==--__
__--== http://www.sol-system.pl ==--__
__--==============================--__