can any body tell me, how to calculate the total no. of rows in resultset
IIRC you move to the bottom of the result set and you return the row number.