0

Hello Friends!

Want to Post something i know might be very weird but this is how it goes.

In Java we use

RS.getString("FirstName");

to get the value of the column FirstName from the database.

If the valueis not detected then it shows null in the Text Box.

RS.getInt("StudentID");

to get the value of the Column StudentID in integer from the Database.

If the value is not detected then it displays 0.

I want to ask is there a way such that if there is no value then nothing is displayed on the Text Box instead of showing null for string columns and 0 which is showed for integer columns.

All Help Appreciated.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by SagarSe7en
0
String temp = RS.getString("FirstName");

if(temp.isEmpty()){
   out.println("....");
}else{
   out.println("....");
}

I'm a bit rusty, but give it a whack

0

hey tyson thanks im gonna be trying the code soon enuf!


Thanks For The Reply :-)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.