Subject Re: jaybird returns zero instead of null for DECIMAL colmn
Author paulstevenhowells
--- In Firebird-Java@yahoogroups.com,
"paulstevenhowells" <paulstevenhowells@...> wrote:
>
> --- In Firebird-Java@yahoogroups.com, Roman Rokytskyy <roman@>
> wrote:
> >
> > > I have a Firebird 2.1 database installed on Windows XP. I am
> > > accessing the DB from a java web application using the jaybird-
> full-
> > > 2.1.3.jar JDBC driver. My problem is that when I select null
> from my
> > > "primary_image decimal(10)" column the result set returns
zero.
> I
> > > need it to return null. I don't know if this is a feature that
I
> > > need to turn off or what. The table definition and log4j logs
> are
> > > below...
> > > ...
> > > You can see above that a null is being inserted into in the
> > > PRIMARY_IMAGE column. I have verified that it is null in the
> > > database by using another tool. When the above SQL is executed
> the
> > > null is returned as zero. WFT?
> >
> > Sounds strange... can you prepare a standalone test case to
> reproduce
> > the issue?
> >
> > Roman
> >
>
> I will try that today.
>

My test has revealed that a null is being returned by the driver. It
must be the iBatis layer that is converting it to zero.