Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

java: Hos to get the size of a returned result set?

  • 02-02-2005 11:50AM
    #1
    Registered Users, Registered Users 2 Posts: 4,228 ✭✭✭


    As the topic asks, cant seem to be able to do this

    for example if i execute a query that returns more than one result

    ResultSet rs = statement.executeQuery(QUERY);

    how do i get the size of the result set?
    I thought

    rs.getFetchSize();

    would do it but it doesnt seem to.

    using NetBeans and j2sdk 1.5.0


Comments

  • Registered Users, Registered Users 2, Paid Member Posts: 2,032 ✭✭✭lynchie


    If you need to know the size of it before you process it, use scrollable resultsets, go to the last row and call rs.getRow() on it.


Advertisement