Here is a solution for ur problem
Statement statement = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
ResultSet rs = statement.executeQuery(query);
rs.last();
int numberOfRows = rs.getRow();
rs.beforeFirst();
mail me if u have any questions
sateesh
Originally posted by deekasha gunwant:
hi all,
i want to find out the number of rows in a result set before proceesing it.
i used getFetchSize() for this but this method is returning 1 always.
i want to know what is the significance of this method and is there any method in jdbc 2.0 to find out the number of rows in a resultset.
regards
deeksha