This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hi all, I have a question. After you execute a query, say from a servlet, and you get a resultSet. Is there any way you can know how many rows are there in this resultSet?? (I mean is there any function that does that?) or do you just have to do it manually (while(rs.next()) i++; )? Thank you
There aren't any rows in the ResultSet until you ask the database to put them there. And yes, the normal way to ask the database for the row is to call "rs.next()". It's also possible to call "rs.last()" and go directly to the last row; this makes the database put all the rows into the ResultSet. However it's pointless to do that if you have a forward-only ResultSet as you will not be able to go back to the rows that you skipped.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com