Solution: How do I get the size of a java.sql.ResultSet? #it #fix #development
Solution: How do I get the size of a java.sql.ResultSet? #it #fix #development
How do I get the size of a java.sql.ResultSet?
Shouldn’t this be a pretty straightforward operation? However, I see there’s neither a size() nor length() method.
Answer [by JeeBee]: How do I get the size of a java.sql.ResultSet?
ResultSet rs = ps.executeQuery(); int rowcount = 0; if (rs.last()) { rowcount = rs.getRow(); rs.beforeFirst(); // not rs.first() because the rs.next() below will move…
View On WordPress









