paging Help!!!!!

Results 1 to 7 of 7

Thread: paging Help!!!!!

  1. #1
    jaybone Guest

    Default paging Help!!!!!

    trying to display recordset in paged results. Everything seems fine except when I hit next button to go to next page of results I get:<BR><BR>You must select an area to complete a search! <BR> &#039;This is message I programmed to come up when user does not <BR> choose selection from list box!<BR> <BR>Then get this error message:<BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression &#039;PropertyInformation.ZipCode IN () AND PropertyInformation.ListPrice &#062;= &#039;&#039; AND PropertyInformation.ListPrice &#060;= &#039;&#039; AND PropertyInformation.Bedrooms = &#039;&#039; AND PropertyInformation.Baths = &#039;&#039; AND PropertyDetails.SquareFeet = &#039;&#039; AND PropertyInformation.YearBuilt =&#039;. <BR><BR>/Pages/searchresults.asp, line 365 <BR> <BR>Here is code that displays data and navigation tools. Any help or suggestions are appreciated.<BR><BR>Dim Count<BR>Count = 0<BR>DO WHILE NOT SelProp.EOF AND Count &#060; SelProp.Pagesize<BR> ShowProperty <BR>Count = Count + 1<BR>SelProp.MoveNext<BR>LOOP <BR><BR>if abspage &#062; 1 then<BR> Response.Write("&#060;INPUT TYPE=BUTTON VALUE=PREV ONCLICK=""document.location.href=&#039;searchresul ts.asp?abspage=" & abspage - 1 &"&#039;;""&#062;")<BR>end if<BR><BR>if abspage &#060;&#062; CInt(pagecnt) then <BR> Response.Write("&#060;INPUT TYPE=BUTTON VALUE=NEXT ONCLICK=""document.location.href=&#039;searchresul ts.asp?abspage=" & abspage + 1 &"&#039;;""&#062;")<BR>end if<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: paging Help!!!!!

    What&#039;s with the & ";" without really looking at your code this may be the problem. get rid of it and test.

  3. #3
    jaybone Guest

    Default Same error-

    got this code snippet from 4 guys article paging with n results. don&#039;t know why all that stuff is in there at the end. but it didn&#039;t change anything when I took it out. Any other ideas. Thanks for responding.

  4. #4
    Reggie Guest

    Default Plenty of errors

    There is an apostrophe missing at the very end of your SQL statement. Also, I don&#039;t think you can use integer function with Strings. For example:<BR><BR>PropertyInformation.ListPrice &#060;= &#039;&#039;<BR><BR>The comparison operator &#060;= indicated that you are comparing 2 ints, but the apostrophes indicate you have stored it as a String. Might cause unexpected results.

  5. #5
    jaybone Guest

    Default its not the sql statement- read problem again

    recordset is returned fine. indicating sql statement is working. problem is when i page recordset to show 4 records per page I get the first 4 records. I have a response.write that returns correct rs.count and pagecount. but when i try to navigate to page 2 then i get errors that are in first post. Any other ideas.

  6. #6
    Reggie Guest

    Default RE: its not the sql statement- read problem again

    Did you pass all of your variables to the second search page?

  7. #7
    jaybone Guest

    Default no how do I do that

    I think your on to something!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts