java baba java baba - 9 months ago 50
Java Question

how get length or size of Resultset in java

I want to know how many rows in result set after executing the particular query

ResultSet rs = ps.executeQuery();

how get the size of rs???
thanx in advance


If you just want the number of rows in the ResultSet, you can do :

int size= 0;
if (rs != null)   
  size = rs.getRow();