This is the way I am handling NULL values.
lRS is my result set.

 ordCustAddr4  = lRS.getString("t_ord_cust_addr4");
  ordCustAddr4 = lRS.wasNull() ? " " : ordCustAddr4.trim();

wasNull checks if the last get was null.   It is a pain in the... if you have
lots of columns coming back.
You have to check each one.

Take a look at java.sql.ResultSet .

I hope this helps.

JEH




From: "Sandro@Delta" <sandro.ruch on 10/01/99 01:11 PM

Please respond to "Sandro@Delta" <[EMAIL PROTECTED]>



 To:   [EMAIL PROTECTED]

 cc:   (bcc: Jose E Herrera/CHI/NTRS)








 Subject: NULL-Value from the Database









hi there
just another well known problem...:-))
in short: how to handle null-value from the database?
i my application i have written a db-layer which is responsible for all
of my database-requests. but i've just encountered the same old problem...
null-values!
my first idea was to extend all involved datatypes like strings and
especially integer
from their own classes with a new method isNull()... but unfortunately they
are defined as final...
has anyone solved this problem or is there a NullClass which handles this??

thanks for any hint!!
sandro

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to