I think it's most common method to find if ResultSet is empty, and then to loop through results:
if (resultSet.next()) {
do {
//your code
} while (resultSet.next());
}
else {
// throw an Exception
}
if (resultSet.next()) {
do {
//your code
} while (resultSet.next());
}
else {
// throw an Exception
}
No comments:
Post a Comment