Re: Recordset Paging - Not Showing records on next page
- From: Infused <anxietyanswers@xxxxxxxxx>
- Date: Wed, 27 Jun 2007 09:40:20 -0700
On Jun 27, 1:45 am, "Daniel Crichton" <msn...@xxxxxxxxxxxxxxxx> wrote:
AnxietyAnswers wrote on Tue, 26 Jun 2007 01:39:18 -0700:
When I use the next button no records show up on the next page...
I've been going over this for half a day and can't figure it out. Any
help would be greatly appreciated!
<form action="<%= Request.ServerVariables("SCRIPT_NAME") %>"
method="POST">
Script Name:
<% Response.Write(Request.ServerVariables("SCRIPT_NAME")) %>
<input type="hidden" name="CurrentPage" value="<%= intCurrentPage%>">
<%
If intCurrentPage > 1 Then %>
<input type="submit" value="Previous">
<% End If
If intCurrentPage <> intTotalPages Then %>
<input type="submit" name=submit value="Next">
<% End if %><% End IF%>
</form>
</body>
</html>
In the above form you don't have any of the fields required to fill the
query with values for the ZIP being looked for, so your query is running
with different data than the initial request, and likely bringing back an
empty recordset which is why you get no results. You'll need to add the ZIP
code as a hidden field in the form so it gets resubmitted with the
Previous/Next button.
Absolutely right thanks Dan I added the hidden fields in the form and
now I'm getting the intial recordset in next page. Thanks!
Also I can't see anywhere in the code I trimmed out that sets the page to
view - you're reading the AbsolutePage value into the intCurrentPage
variable, rather than setting AbsolutePage to the page you want to view, so
even if you'd been passing the ZIP in the second form you'll just be showing
page 1 of the results again no matter which button is pressed.
Dan- Hide quoted text -
- Show quoted text -
I kept getting the error
ADODB.Recordset error '800a0cb3'
Current Recordset does not support bookmarks. This may be a limitation
of the provider or of the selected cursortype.
when I had the abolsultepage = intcurrentpage the right way around
and thought I had the cursortype set the right way but when I checked
it was coming up with cursortype = 0
I've got everything fixed and it's working perfect now thank you so
very much for your help I really appreciate it!!!
Jon
.
- Follow-Ups:
- Re: Recordset Paging - Not Showing records on next page
- From: Daniel Crichton
- Re: Recordset Paging - Not Showing records on next page
- References:
- Recordset Paging - Not Showing records on next page
- From: AnxietyAnswers
- Re: Recordset Paging - Not Showing records on next page
- From: Daniel Crichton
- Recordset Paging - Not Showing records on next page
- Prev by Date: Re: Recordset Paging - Not Showing records on next page
- Next by Date: Re: Recordset Paging - Not Showing records on next page
- Previous by thread: Re: Recordset Paging - Not Showing records on next page
- Next by thread: Re: Recordset Paging - Not Showing records on next page
- Index(es):