🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14618

Re: Null became 0?

#14618
From: Paul Furbacher [TeamB]
Date: Thu, 19 Aug 1999 00:00
21 lines
1117 bytes
HooLee wrote:

> I got the data from Oracle DB by getBigDecimal() method.
> When the value in DB is null, I don't want to output anything into
> TextField.
> But always output 0.  How does null become 0?
> I even tested as follows..
> 
> dataquerySet.setBigDecimal("cost",null);
> if (dataquerySet.getBigDecimal("cost") == null )
>   System.out.println("null");
> 
> But the process doesn't go inside of if block.

This got me, too.  You have to write 

   if ( dataquerySet.isNull("cost") ) 
     ...


Paul Furbacher  (TeamB)
Technical Details
Message-ID: <37BC10A7.B748F955@bilbo.bio.purdue.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7pfmnr$31019@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e4bbec8c981b1648
X-Google-Attributes: gidf74b3,public
From: "Paul Furbacher [TeamB]" <pf@bilbo.bio.purdue.edu>
Subject: Re: Null became 0?
Date: 1999/08/19
Message-ID: <37BC10A7.B748F955@bilbo.bio.purdue.edu>
X-Deja-AN: 514684019
Content-Transfer-Encoding: 7bit
References: <7pfmnr$31019@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: Reverse Alchemy, Inc.
Mime-Version: 1.0
Reply-To: pf@bilbo.bio.purdue.edu
Newsgroups: borland.public.jbuilder.java.language