Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

null values

 
sandeep balyan
Ranch Hand
Posts: 134
  • 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
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic