File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "null values" Watch "null values" New topic
Author

null values

sandeep balyan
Ranch Hand

Joined: Jul 25, 2001
Posts: 134
Hi
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
regds
sandeep


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

Joined: Nov 06, 2000
Posts: 1506
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.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Arun Vethadas .T
Ranch Hand

Joined: Dec 13, 2001
Posts: 36
hai
use like this.
String t4 = rs.getString("username");
if(t4==null)
{
t4="";
}
String t5 = rs.getString("modality");
if(t5==null)
{
t5="";
}
Arun.
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 ..
regd's
sandeep
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: null values
 
Similar Threads
keywords
How to handl Null Values from Database
db record values null?
Reserved words vs. keywords
problem with returning values to Jcombo box origin see code