Results 1 to 1 of 1
Nov 30, 2000, 15:59 #1
- Join Date
- Apr 2000
- Long Beach, CA
- 0 Post(s)
- 0 Thread(s)
Hey you ASP masters out there. I need an expert!!!
I use a form to derive the WHERE clause of a SQL statement. From the recordset that's generated, I use ths page breakdown thing that I found on ASP Watch. It works great on the first page (or on pages where the SQL statement is Hardcoded) but where the SQL statement is dynamic (from the form), it divides up the pages, and links them properly, but when I try to move to the 2nd or latter pages, I get an error stating a problem with the "WHERE" clause.
My guess is that I have to somehow pass the user input to each page... But that doesn't make sense since the recordset is already generated!!!! I don't know. Any suggestions??
strSQL = strSQL & " WHERE " & varSQL
oRS.Open strSQL, oConn, adOpenStatic, , adCmdText
If oRs.RecordCount > 0 then
response.write "<p>Your searched yielded " & oRS.Recordcount & " results. Here they are: </p>"
If not isEmpty(Request.QueryString("pageno")) then pageno=Request.QueryString("pageno") else pageno=1
for page=1 to oRS.PageCount
links=links & "<a href='test-resp.asp?pageno=" & page & "'>Page "&page&"</a>"
if page < oRS.PageCount then
links=links & " | "
links=links & "</p>"
for intRecord =1 to oRS.PageSize
if oRS.EOF then
I'll give you much internet props if you can help!!!!