> If you are using JDBC 1.2 you can do it like this (snippet): > > //declare your Statement to return a scroll insensitive result set > //before you make the query > stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, > ResultSet.CONCUR_READ_ONLY); > > //get the number of rows by scrolling to the last row, > //getting its number, then returning to the start: > try { > resultSet.last(); > numberOfRows = resultSet.getRow(); > resultSet.beforeFirst(); > } catch (Exception e) { > e.printStackTrace(); > }
This will only work, IF the underlying driver really supports all methods offered by JDBC. !this is not for sure! -> see ORACLE who did not implement all resultset navigation methods. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>