Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: sequel problem

  1. #1
    Regular Coder
    Join Date
    Mar 2005
    Posts
    735
    Thanks
    4
    Thanked 1 Time in 1 Post

    sequel problem

    I don't understand why title= 1 when the field title is a text?
    Code:
    Select title, chapter FROM scarletandthebeast WHERE title = 1

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Posts
    735
    Thanks
    4
    Thanked 1 Time in 1 Post
    I don't even have 1 in the field. I don't know why it's reading 1.

    Heres' what I have:
    Code:
            <td colspan="1" align="center">
                <%
                'This SQL statement creates a list of books
                SQL1 = "Select title, chapter FROM scarletandthebeast WHERE title = '" & title & "'"
    '& " ORDER BY Chapter ASC"
    
                response.write sql1 & "</br>"
    rs.Open sql1,conn, 1
                    %>
                    <select name="title" id="title" size="5" style="width:500;" onchange="go('refresh');" <%'onchange="go2();"%>>
                    <%
                    Do until RS.eof
                        %>
                        <option <%if title = rs("title") then response.write "selected" end if%> value="<%=RS("title")%>"><%=RS("title")%></option>
                        
                        <%
                        rs.movenext
                        if rs.eof then
                            exit do
                        end if
                    Loop
                    %>
                    </select>
                    <%
                rs.close
                
                %>
            </td>
    And it's reading:
    Code:
    Select title, chapter FROM scarletandthebeast WHERE title = '1'
    THis is what it should read instead of 1:

    preface
    "Scriptural Clues to the ""Mystery of Iniquity"""
    Scripture, History and Conspiracy

  • #3
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Response.Write(title), what do you get?

  • #4
    Regular Coder
    Join Date
    Mar 2005
    Posts
    735
    Thanks
    4
    Thanked 1 Time in 1 Post
    Select title, chapter FROM scarletandthebeast WHERE chapter = ''
    Code:
    ADODB.Field error '80020009'
    
    Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record.
    
    ?
    I noticed,, since the code is recycled, that there were "int" and "Cint" wrapping the "request":
    Code:
                chapter        = request("chapter")
                title     = request("title")
                subtitle       = request("subtitle")
    I might as well send the code as attachment. I think it's a numerical problem which I can't figure:
    Attached Files Attached Files


  •  

    Posting Permissions

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