Forums
This topic is locked
Problem with limiting records for display
Posted 16 Mar 2002 19:58:27
1
has voted
16 Mar 2002 19:58:27 Tom Devins posted:
Hi,I'm trying to limit records returned to about 10 per page. I have a form on my page that determines the SQL query which will bring back say 40 total records and display 10.
My problem is when I use the next button to scroll to the next 10 records I lose my recordset.
Is there a conflict between my form determining the value of the sql query and UD's next/previous server behaviours. I'll include the basic query determinant below.
Any suggestions would be appreciated.
Thanks.
*****************************************
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset"
Recordset1.ActiveConnection = MM_newConnect_STRING
Dim strRegion
strRegion = Request.form("region"
Recordset1.Source = "SELECT * FROM tourism_collection where area = '" & strRegion & "';"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>
*****************************************
PS: my SQL statement is the only thing "custom" made ... everything else is straight UD server behaviours.