Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2004, 07:10 AM
Registered User
 
Join Date: Mar 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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




 
Old March 28th, 2004, 07:29 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I think you need to post the code for the recordset too. It looks like you're passing either too much, or too little information to the SQL statement that retrieves your records.

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
DB recordset paging using ajax paging? kumiko Classic ASP Basics 0 May 26th, 2008 10:23 AM
Passing parameters in URL british4 Crystal Reports 1 June 27th, 2005 02:55 AM
Problem with recordset paging Stefania Classic ASP Databases 0 February 11th, 2005 08:59 AM
Getting error w/Paging through recordset Calibus Classic ASP Databases 3 September 2nd, 2004 06:41 PM
Problem in Recordset Paging zaeem Classic ASP Databases 2 October 15th, 2003 12:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.