Ok, quick question...hopefully someone will know. What is the best way to determine if a ResultSet is empty for a FORWARD ONLY ResultSet?? You can't use the first method because it is for scrollable result sets. next() would return false if the ResultSet is empty but it will also move the cursor forward. I want a way to check if the ResultSet is empty on a forward only ResultSet without moving the cursor forward. If anyone knows I'd appreciate your comments.
08-18-2005, 03:51 AM
// rs is not empty
//rs is empty
note that when using this approach, you'll have to use a do-while loop to loop through the records, since you are already at the dirst one.