Checking the results of a ResultSet


boolean recordsWereFound = false;
while (rs.next()) {
recordsWereFound = true;
// process this record;
}
if (! recordsWereFound) {
// do this if no records were found
}

Related Posts: