SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WHy does it show 1 record per page instead of 10?

    http://k.domaindlx.com/gemetria/kjvr...s&optAction=on
    Each page is skipping 20 records. First page shows id # 21944 and page 2 shows 21964.

    The next page ( 3rd ) shows:
    ADODB.Field error '80020009'

    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

    /gemetria/kjvresp5.asp, line 0
    This is the SQL:
    SELECT * FROM hebbooktable INNER JOIN hebrewbibletable ON hebbooktable.book = hebrewbibletable.book WHERE chapter LIKE '5' AND (recordType = 'da') ORDER BY id ASC
    Compare bible texts (and other tools):
    TheWheelofGod

  2. #2
    SitePoint Addict
    Join Date
    Jun 2004
    Location
    germany
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i guess you are not verifying weather data exists or not.
    rs.open "select * from tablename where your where query",con

    now if you asign a value say Yourvariable=rs.fields("Code") and if the recordset has got no records then you get this error.

    so do a check before using the recordset values

    rs.open "select * from tablename where your where query",con
    if not rs.eof then
    your code
    end if

    or
    do while not rs.eof
    your code here
    rs.movenext
    loop
    Knowledge is all about Sharing

  3. #3
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Canada
    Posts
    730
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    It exists

    I have the database table open and have found it by searching it myself.
    Here is the code in txt file.



    But to help you out, since the full code in the file is long, I think this is where something goes wrong.

    Code:
        If Len(Request("page")) = 0  Then
            rs.AbsolutePage = 1
          Else
            If CInt(Request("page")) <= rs.PageCount Then
                rs.AbsolutePage = Request("page")
              Else
                rs.AbsolutePage = 1
            End If
        End If
        
        Dim abspage, pagecnt
          abspage = rs.AbsolutePage
          pagecnt = rs.PageCount


    I also think there is something wrong in this section:

    Code:
    if rs.bof and rs.eof then
           Response.Write "No records found!"
    Else
        If Not rs.EOF Then%>
           <center>
           <form>...
    Because when the search cannot find a query it shows error.
    Attached Files Attached Files
    Compare bible texts (and other tools):
    TheWheelofGod

  4. #4
    SitePoint Evangelist
    Join Date
    Sep 2003
    Location
    San Diego, CA
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try changing the...
    Code:
    if rs.bof and rs.eof then
           Response.Write "No records found!"
    Else
        If Not rs.EOF Then%>
           <center>
           <form>...
    ...to...
    Code:
    if rs.bof OR rs.eof then
           Response.Write "No records found!"
    Else
        If Not rs.EOF Then%>
           <center>
           <form>...


Bookmarks

Posting Permissions

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