I have a search results page which I populate by calling a stored procedure in SQL Server 2000 and saving the results to a recordset.
I iterate through the recordset placing each field in the appropriate column and row where I also take the id field and href to a matching image which appears on the same row with the corresponding record.
My code is this:
'If the recordset is full then display column headers
<%If rsItem.eof = false then %>
<table class="medium">
<tr>
<td><p>Click on the images below to see details</p>
</td>
</tr>
<tr>
<td><b> Image</b></td>
<td><b> Item Number</b></td>
<td><b> Description</b></td>
</tr>
<%'Write each item to the page
While Not rsItem.EOF%>
<%'Get the matching image for the record %>
<td><div><a href="../dynamic/main.asp?PN=
<%=rsItem.Fields.Item(2)%>&UID=<% =UID%>
&AUF1=4&AUF2=5&AUF3=6&AUF4=7<imgsrc=
"/images/search/p
<% =rsItem.Fields.Item(0)%>B.gif">
</a>
</div>
</td>
<%'Display Item Number%>
<td><div><% =rsItem.Fields.Item(2)%></div></td>
<%'Display Item Description%>
<td ><% =rsItem.Fields.Item(1)%></td>
</tr>
<%rsItem.Movenext
Wend %>
How can I page through the recordset showing only a set amount on each page?
Is there a way to save the recordset to an object that will hold the results even as the next page is called?
I've been researching using an Array but I'm not sure how to display the data like I have it now.
Please help if you can.
J
I iterate through the recordset placing each field in the appropriate column and row where I also take the id field and href to a matching image which appears on the same row with the corresponding record.
My code is this:
'If the recordset is full then display column headers
<%If rsItem.eof = false then %>
<table class="medium">
<tr>
<td><p>Click on the images below to see details</p>
</td>
</tr>
<tr>
<td><b> Image</b></td>
<td><b> Item Number</b></td>
<td><b> Description</b></td>
</tr>
<%'Write each item to the page
While Not rsItem.EOF%>
<%'Get the matching image for the record %>
<td><div><a href="../dynamic/main.asp?PN=
<%=rsItem.Fields.Item(2)%>&UID=<% =UID%>
&AUF1=4&AUF2=5&AUF3=6&AUF4=7<imgsrc=
"/images/search/p
<% =rsItem.Fields.Item(0)%>B.gif">
</a>
</div>
</td>
<%'Display Item Number%>
<td><div><% =rsItem.Fields.Item(2)%></div></td>
<%'Display Item Description%>
<td ><% =rsItem.Fields.Item(1)%></td>
</tr>
<%rsItem.Movenext
Wend %>
How can I page through the recordset showing only a set amount on each page?
Is there a way to save the recordset to an object that will hold the results even as the next page is called?
I've been researching using an Array but I'm not sure how to display the data like I have it now.
Please help if you can.

J