posted 19 years ago
Hi,
I want to know what is the difference between while(rs.next()) and if(rs.next())? I'm not sure about this but I think that while is for more than 1 data in the db while if is to check whether there is data or not inside db and can only retrieve 1 data.
so my question is:
if I have no data on 1 thing but I have 1 or more data on another 1 then how to check for that one.because in my program some still don't have data so this part, I always have java.lang.nullpointerexception. thanks...