Checking the results of a ResultSet
December 13th, 2007No Comments
boolean recordsWereFound = false;
while (rs.next()) {
recordsWereFound = true;
// process this record;
}
if (! recordsWereFound) {
// do this if no records were found
}
December 13th, 2007No Comments
boolean recordsWereFound = false;
while (rs.next()) {
recordsWereFound = true;
// process this record;
}
if (! recordsWereFound) {
// do this if no records were found
}