This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 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.


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
How to handl Null Values from Database
Reserved words vs. keywords
keywords
problem with returning values to Jcombo box origin see code
db record values null?