FilteredRowSet

Discussion in 'JSP' started by nelsonchristos, Oct 3, 2006.

  1. nelsonchristos

    nelsonchristos New Member

    Joined:
    Aug 9, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    in our prj we need that records be displayed on the page.
    It might be any number of records and there is no next or previous buttons
    But is place where i am stuck is in giving the search option
    the records being displayed have columns like these
    doc_num, doc_date, variety, product ,qty, wt, units
    so i need to give the search option based on these columns

    i have two approaches at hand
    1> to get the ResultSet and then populate the javabeans for that particular records and then whenever a search is made query the db and find the records

    2>to get a FilteredRowSet and then whenever a query is placed instead of making a db query filter the rowset itself

    the problem is i cant understand whether making searches on the rowset is faster than making db query

    i am not able to figure which is the best possible solution
    can anybody help me out
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    The best possible option is to get the db to execute the filtered query rather than have yourself loop through each result set and filter the display.
     
  3. nelsonchristos

    nelsonchristos New Member

    Joined:
    Aug 9, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    hey shabbir thanks for the reply
    anyways we have left the FilteredRowSet thing aside for the time being.
    But a query is still there back in my mind about the intended purpose of Rowset classes.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    My answer would still remain the same as to not to go for looping but query the database.
     
  5. nelsonchristos

    nelsonchristos New Member

    Joined:
    Aug 9, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    ya man got your point
    thanks again
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice