Forums

This topic is locked

Recordset Paging Dilemma

Posted 19 Jan 2008 11:42:18
1
has voted
19 Jan 2008 11:42:18 conor wall posted:
Hi,

I need some help about a recordset paging problem. My site has a search page (search.html) which displays the search results on a results page (results.asp). This results page has a recordset paging procedure (Next, Previous ...) which I have included successfully already. By clicking on any one of the results, you can view each one in more detail on a view page (view.asp). I also want to implement recordset paging on this page, but am finding it difficult.

The search results from the ‘search.html’ page have to be passed to the ‘results.asp’ page, and then passed onto the ‘view.asp’ page. Or else the search criteria would have to be passed to the ‘view.asp’ and then using the same SQL code as the ‘results.asp’ page, the search could be redone.

search.html --> results.asp --> view.asp (recordset paging ??)

As I am pretty green to the website building scene, my hand coding isn’t too hot. I was hoping someone knew a way I could achieve this by using DW dummy panels. Or do you think some asp hand-coding is required? If so, do you have any old piece of code that would do the job?

Thanks,

Conor

Replies

Replied 19 Jan 2008 15:01:20
19 Jan 2008 15:01:20 Javier Castro replied:
on your view page, you need to apply the Server Behaviors --> Recordset paging = Move to Specific Record
The value you pass is the "id" of the record you linked on your previous page

Also, I 'm pretty sure for this to work you cannot have Move to Specific Record on your Results page.

Pretty early here so I'm not fully awake yet. Hope it helps.

J.
Replied 22 Jan 2008 09:01:16
22 Jan 2008 09:01:16 conor wall replied:
Cheers J,

After playing around with the ‘Move to Specific Record’ behavior, I got the recordset paging working. For anyone else who might want to apply recordset paging links to your ‘view.asp’ page, on your ‘view.asp’ page you have to set up a new recordset which redoes the search process all over again. Therefore the SQL code in your ‘view.asp’ recordset will be very similar to the SQL code in your ‘results.asp’ page.

The parameter values inside the recordset can be set using the following line of code:

Request("SearchValue"

where ‘SearchValue’ is a field name in the FORM on the ‘search.html’ page. The Request() checks both the FORM and the URL query string for any parameters that might be passed. In essence it performs both Request.Form() and Request.QueryString() procedures.

Thanks again J,

Conor.

PS. One other question. Using this method, the server has to constantly repeat the database search using the SQL code. Could this cause a problem, if the server gets overworked? Will this method cause the web pages to take a longer time to load while they wait for the SQL to pull results from the database? Is there a better way to do recordset paging? Can the results from the original search be passed in the querystring instead of the search parameters?

Reply to this topic