Subject RE: [IBO] TIBOQuery param AsFloat strange behaviour
Author Jason Wharton
I've been working on other things of late.  Would you be able to make me a sample app real quick?
 
Jason


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Friday, June 08, 2018 11:24 AM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] TIBOQuery param AsFloat strange behaviour

I'm having the same issue, could you reproduce this yet?


Em 09/05/2018 15:52, 'Jason Wharton' jason@... [IBObjects] escreveu:
 

This sounds like a bug to me and so it should definitely be addressed.
I'd very much appreciate it if someone can send a sample app duplicating this issue.
 
Jason Wharton
 


From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]
Sent: Wednesday, May 09, 2018 12:49 PM
To: IBObjects@yahoogroups.com
Subject: Re: [IBO] TIBOQuery param AsFloat strange behaviour

 

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 ==--__
__--==============================--__