jeudi 1 janvier 2015

Java - Unable to read inside the recordset contained with if else statement

I have a piece of java code that I am not sure as to why I am not getting any results from it. The code goes as such:



if (!ReminderList.next()) {
-- Show that there are no records available
} else {
while (ReminderList.next(){
-- Show that there are record
System.out.println(ReminderList.getString("ReminderID"));
}
}


The if..else condition works perfectly and if there are records, the system does enter the else system. However, it does not enter the while loop. What am I missing?


Aucun commentaire:

Enregistrer un commentaire