Bypassing Recordset Filtering

Discussion in 'ASP / ASP.net' started by sladmin, Mar 21, 2008.

  1. sladmin CSNM Reseller

    Hiya,

    I have a recordset that filters using a Querystring. However, when the page first loads, I want the filtering to disappear. I have a field called Priority which filters my records, but when the page first loads I want all records to display, and not just the ones that the default value is set as.

    Any ideas on how to do this? If you need more info let me know :)

    TIA,
  2. siphilp CSNM Customer

  3. sladmin CSNM Reseller

    Thanks for your reply Simon,

    Is that for .net? I forgot to mention that I'm using ASP VB (I know, old now) :D.

    Thanks,
  4. siphilp CSNM Customer

    Ah,
    Could you not use a Request.Querystring statement so if the querystring is null return all records else return filtered view?
  5. sladmin CSNM Reseller

    Hmm... possibly. I thought about creating two recordsets, and hide each one when I don't need them although the second one which would not be filtered would always show.

    Plus doing it that way would put more strain on the server loading times.
  6. siphilp CSNM Customer

    You could ajax it or use some funky client side javascript sorting. (Accessibility problems)

    Could get complicated :S
  7. sladmin CSNM Reseller

    I was hoping someone wasn't going to say that :gagged: :unsure:

    I'll have a digg around on Google, there must be something around. I don't really want to get too complicated, as it puts extra load on the page, and as you say would cause accessability problems.
  8. siphilp CSNM Customer

    I think the cleanest would be an if else and use 2 calls.

    You could always use a nice sql query that returns a set of rows based on the page number so your not pulling back all of them :)

    For example page size is 15. First Call no querystring would be something like

    Select top 15 from tblExample where Title = 'Hello world'

    no querystring selecting page 2.

    http://www.4guysfromrolla.com/webtech/062899-1.shtml

    if the querystring exists then you could call the same as above but with you where clause :)

    How many records are we talking?
  9. siphilp CSNM Customer

Share This Page