This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes null values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "null values" Watch "null values" New topic

null values

sandeep balyan
Ranch Hand

Joined: Jul 25, 2001
Posts: 134
Iam selecting some values from database problem is this values that r null in Database r coming as "null" in fields on form ..i want them to be empty ...using JSP and ORCL

Want to do something great will do one day
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
The ResukltSet object has a wasNull() method that tells you if the column just ead has a null value. Of course, you have to read the column first before calling this method.

So much trouble in the world -- Bob Marley
Arun Vethadas .T
Ranch Hand

Joined: Dec 13, 2001
Posts: 36
use like this.
String t4 = rs.getString("username");
String t5 = rs.getString("modality");
sandeep balyan
Ranch Hand

Joined: Jul 25, 2001
Posts: 134
Hi friends iam with u in this and i know this solution but problem is this Iam having more than 50 fields ..and this way it is not possible to write for every field..
just check in ..
It is sorta covered in the JavaRanch Style Guide.
subject: null values
Similar Threads
problem with returning values to Jcombo box origin see code
db record values null?
How to handl Null Values from Database
Reserved words vs. keywords