This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

null values

 
sandeep balyan
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Arun Vethadas .T
Ranch Hand
Posts: 36
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic