Passing URL Parameters Using Recordset Paging
Passing URL Parameters Using Recordset Paging
---------------------------------------------
filename is grid.asp which has three parameters Request_type, role and Status.
At the top of the grid.asp iam retreiving the parameter values to local variables as
<%
dim rtype,role,status
rtype = Request("Request_type")
role = Request("Role")
status = Request("Status")
%>
Recorset Page Size is set to 10, it retrives 10 Records.
on execution grid.asp is displayed fine with first 10 records, but when iam clicking on page to view next 10
records it is giving this error.
----//ERROR//-------------
ERROR MESSAGE :
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'AND'.
---------//---------------
Scrolling Navigation code in grid.asp is as follows
::::CODE:::::
<%
dim turl
Response.write rtype
turl = "grid.asp?Request_type="
turl = turl & Request("Request_type")
turl = turl & "&role="
turl = turl & Session("Role")
turl = turl & "&Status="
turl = turl & Request("Status")
Response.write turl
%>
<Form Action="<%=turl%>" Method="Get">
<Input Type="Hidden" Name="PageNo" Value="<%= PageNo %>">
<% If PageNo < oRs.PageCount Then %>
<INPUT TYPE="submit" Name="Mv" style="font-size: 8pt; font-family: Arial;
font-weight: bold; border: 1px solid #800000; background-color: #FFFFFF" Value="Next">
<% End If %>
<% If PageNo > 1 Then %>
<INPUT TYPE="submit" Name="Mv" style="font-size: 8pt; font-family: Arial; font-weight: bold;
border: 1px solid #800000; background-color: #FFFFFF" Value="Previous">
<% End If %>
</Form>
::::::::::::::::::
What Might be the solution?
Thanks in advance for your Help.
Syed Moiz
|