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.

String temp = RS.getString("FirstName");

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

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

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


Thanks For The Reply :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.