Forums

This topic is locked

MM_moveNext only moves one record at a time?

Posted 28 Sep 2002 23:38:26
1
has voted
28 Sep 2002 23:38:26 Todd Patrick posted:
In Dreamweaver MX, I have set the number of records to display in search results page to display ten records at a time. However, when I added the Recordset Navigation Bar, the code for MM_moveNext only moves one record at a time, even though it should be ten records at a time.

1.) Is this due to my recordset cursor type? What should the recordset cursor type be set to?

2.) Is their a setting that I am missing?

You can see this working at www.gocreighton.com. Type "basketball" in the FlashMX search field and on the results page, click on the "Next >" link and you'll see that you only move one recordset at a time instead of ten recordsets at a time.

Thank you and I appreciate your time to look at this.

Here is the code that I am using:

'--------------------------------------------------------------------------

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 10
Repeat1__index = 0
rsSearchNews_numRows = rsSearchNews_numRows + Repeat1__numRows
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links

Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev

Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "" Then
MM_paramList = Split(MM_keepMove, "&"
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=" - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "" Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If

' set the strings for the move to links
If (MM_keepMove <> "" Then
MM_keepMove = MM_keepMove & "&"
End If

MM_urlStr = Request.ServerVariables("URL" & "?" & MM_keepMove & MM_moveParam & "="

MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
'--------------------------------------------------------------------------

--J. Todd Patrick


Edited by - jtp512 on 28 Sep 2002 23:39:52

Reply to this topic