how to get total number of rows contained in a resultset

Discussion in 'Java' started by Praveen homkar via JavaKB.com, Aug 5, 2005.

  1. Praveen homkar via JavaKB.com, Aug 5, 2005
    #1
    1. Advertising

  2. Praveen homkar via JavaKB.com

    Joan Guest

    "Praveen homkar via JavaKB.com" <> wrote in
    message news:...
    > Hi friends
    >
    > how to get the number of rows contained in filteredrowset or a
    > simple
    > resultset.
    >
    > Thanx in advance
    >
    > praveen


    for MySQL
    rec = st.getResultSet();
    d.numCols = rec.getMetaData().getColumnCount();
    rec.last(); // move to last row
    d.numRows = rec.getRow();
    rec.beforeFirst(); // reset to top
    Joan, Aug 5, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGF2aWQ=?=

    How to get the total number of rows in a Dataset?

    =?Utf-8?B?ZGF2aWQ=?=, May 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    17,246
    Yunus Emre ALPĂ–ZEN [MCAD.NET]
    May 3, 2005
  2. thomson
    Replies:
    1
    Views:
    788
    Brock Allen
    Jun 11, 2005
  3. Liz
    Replies:
    6
    Views:
    67,751
    Dale King
    Apr 15, 2006
  4. yonialhadeff

    Group By Rows and Total Rows

    yonialhadeff, Jan 23, 2007, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    839
    Eliyahu Goldin
    Jan 23, 2007
  5. bhat
    Replies:
    0
    Views:
    139
Loading...

Share This Page