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 7 of 7
  1. #1
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts

    Response object, ASP 0104 (0x80070057)

    Error:
    Error Type:
    Response object, ASP 0104 (0x80070057)
    Operation not Allowed
    /mysite/forum.asp
    Code forum.asp:
    <%@ Language=VBScript %>
    <HTML dir="rtl">
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=WINDOWS-1255">
    </HEAD>
    <BODY>
    <!-- #include file = "menu.asp" -->
    <Br><Br>
    <TABLE align=center><TR><TD><a href="newthread.asp"><font color=green size=4 face=arial>new thread</font></a></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>

    <%

    'On Error Resume Next

    Function strFormat(str)
    If IsEmpty(str) or IsNull(str) Then Exit Function
    Str = Replace(str,"<","&lt;")
    Str = Replace(str,">","&gt;")
    Str = Replace(str,"'","'")
    Str = Replace(str,"""","&quot;")
    Str = Replace(str,chr(13),"<br>")
    strFormat = str
    End Function

    dim conn, rs, sql
    set conn=server.CreateObject("ADODB.connection")
    conn.Open "dsn=db1"
    set rs=server.CreateObject("ADODB.recordset")
    sql="select * from forum order by thread_id desc"
    rs.Open sql, conn

    Response.Write "<TABLE width=800px border=1 cellpadding=3 cellspacing=3 align=center>"
    Response.Write "<tr><td align=center colspan=5 bgcolor=YellowGreen><font size=5><b>פורום</b></font></td></tr>"
    Response.Write "<TR><TD width=30px align=center><B>status</B></TD><TD width=500px align=center><B>title</B></TD><TD align=center width=100px><B>last message</B></TD><TD align=center><B>replies</B></TD><TD align=center width=75px><B>views</B></TD></TR>"
    do while not rs.EOF
    if views > 0 then
    Response.Write "<img src=images/thread.gif>"
    else
    Response.Write "<img src=thread_new.gif>"
    end if
    Response.Write "<td>" & rs("thread_title") & "</td>"
    Response.Write "<td>" & rs("last_post") & "</td>"
    Response.Write "<td>" & rs("replies") & "</td>"
    Response.Write "<td>" & rs("views") & "</td>"
    Response.Write "</td></tr></table>"
    loop

    rs.Close
    set rs=nothing
    conn.Close
    set conn=nothing

    'If Err<>0 then
    'Response.Write Err
    'end if

    %>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    what does it say if u put ur error catching back in and write Err.Description instead of just Err

    Code:
    <%@ Language=VBScript %>
    <HTML dir="rtl">
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=WINDOWS-1255">
    </HEAD>
    <BODY>
    <!-- #include file = "menu.asp" -->
    <Br><Br>
    <TABLE align=center><TR><TD><a href="newthread.asp"><font color=green size=4 face=arial>new thread</font></a></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>
    
    <%
    
    On Error Resume Next
    
    Function strFormat(str)
    If IsEmpty(str) or IsNull(str) Then Exit Function
    Str = Replace(str,"<","&lt;")
    Str = Replace(str,">","&gt;")
    Str = Replace(str,"'","'")
    Str = Replace(str,"""","&quot;")
    Str = Replace(str,chr(13),"<br>")
    strFormat = str
    End Function
    
    dim conn, rs, sql
    set conn=server.CreateObject("ADODB.connection")
    conn.Open "dsn=db1"
    set rs=server.CreateObject("ADODB.recordset")
    sql="select * from forum order by thread_id desc"
    rs.Open sql, conn
    
    Response.Write "<TABLE width=800px border=1 cellpadding=3 cellspacing=3 align=center>"
    Response.Write "<tr><td align=center colspan=5 bgcolor=YellowGreen><font size=5><b>פורום</b></font></td></tr>"
    Response.Write "<TR><TD width=30px align=center><B>status</B></TD><TD width=500px align=center><B>title</B></TD><TD align=center width=100px><B>last message</B></TD><TD align=center><B>replies</B></TD><TD align=center width=75px><B>views</B></TD></TR>"
    do while not rs.EOF
    if views > 0 then
    Response.Write "<img src=images/thread.gif>"
    else
    Response.Write "<img src=thread_new.gif>"
    end if
    Response.Write "<td>" & rs("thread_title") & "</td>"
    Response.Write "<td>" & rs("last_post") & "</td>"
    Response.Write "<td>" & rs("replies") & "</td>"
    Response.Write "<td>" & rs("views") & "</td>"
    Response.Write "</td></tr></table>"
    loop
    
    rs.Close
    set rs=nothing
    conn.Close
    set conn=nothing
    
    If Err.Number <> 0 Then Response.Write Err.Description
    
    %>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    BTW, use CODE not QUOTE to show code, and do not paste your whole page jsut whats wrong with it, it just scares people off

  • #3
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    I fixed the error by adding rs.move next to the code lol.

  • #4
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    oh yea, no rs.MoveNext

    that should have timed out though.. or is that operation not allowed a timeout

  • #5
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    I got another problam, Can you look at that?
    <%@ Language=VBScript %>
    <HTML dir="rtl">
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="TEXT/HTML; CHARSET=WINDOWS-1255">
    </HEAD>
    <BODY>
    <!-- #include file = "menu.asp" -->
    <Br><Br>
    <TABLE align=center><TR><TD><a href="newthread.asp"><font color=green size=4 face=arial>new thread</font></a></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr><td>

    <%

    'On Error Resume Next

    Function strFormat(str)
    If IsEmpty(str) or IsNull(str) Then Exit Function
    Str = Replace(str,"<","&lt;")
    Str = Replace(str,">","&gt;")
    Str = Replace(str,"'","'")
    Str = Replace(str,"""","&quot;")
    Str = Replace(str,chr(13),"<br>")
    strFormat = str
    End Function

    dim conn, rs, sql
    set conn=server.CreateObject("ADODB.connection")
    conn.Open "dsn=db1"
    set rs=server.CreateObject("ADODB.recordset")
    sql="select * from forum order by thread_id desc"
    rs.Open sql, conn, 2

    Response.Write "<TABLE width=800px border=1 cellpadding=3 cellspacing=3 align=center>"
    Response.Write "<tr><td align=center colspan=5 bgcolor=YellowGreen><font size=5><b>forum</b></font></td></tr>"
    Response.Write "<TR><TD width=30px align=center><B>status</B></TD><TD width=500px align=center><B>title</B></TD><TD align=center width=100px><B>last message</B></TD><TD align=center><B>replies</B></TD><TD align=center width=75px><B>views</B></TD></TR>"

    do while not rs.EOF
    Response.Write "<tr>"
    if views > 0 then
    Response.Write "<td rowspan=2><img src=images/thread.gif></td>"
    else
    Response.Write "<td rowspan=2><img src=thread_new.gif></td>"
    end if
    Response.Write "<td align=right><a href=showthread.asp?thread_id=" & rs("thread_id") & ">" & rs("thread_title") & "</a></td>"
    Response.Write "<td align=right>" & rs("last_post_date") & "<font color=gray>&nbsp;&nbsp;" & rs("last_post_time") & "</td>"
    Response.Write "<td align=center>" & rs("replies") & "</td>"
    Response.Write "<td align=center>" & rs("views") & "</td>"
    Response.Write "</tr>"
    Response.Write "<td align=right>by: <a href=user_card?user_id=" <------------HERE (don't notice the mistakes)
    & rs("user_id") &" & rs("last_post") & "</td>" Response.Write "</table>"
    rs.MoveNext
    loop

    rs.Close
    set rs=nothing
    conn.Close
    set conn=nothing

    'If Err<>0 then
    'Response.Write Err
    'end if

    %>
    </td>
    </tr>
    </table>
    </BODY>
    </HTML>
    How can I do that the forum will get the user_id? because the user_id only exists on the users table in the database.
    Last edited by BarrMan; 03-09-2005 at 08:23 PM.

  • #6
    Senior Coder
    Join Date
    Apr 2003
    Location
    England
    Posts
    1,192
    Thanks
    5
    Thanked 13 Times in 13 Posts
    DAMNIT MAN
    BTW, use CODE not QUOTE to show code, and do not paste your whole page jsut whats wrong with it, it just scares people off
    BTW, use CODE not QUOTE to show code, and do not paste your whole page jsut whats wrong with it, it just scares people off
    BTW, use CODE not QUOTE to show code, and do not paste your whole page jsut whats wrong with it, it just scares people off

    *stops*

    u need another recordset if you wanna get data from another query

    the post should have a user id attached to it so you can see who posted it, if you wanna get things like user name out of this then run a query on the users table where id = that id

  • #7
    Senior Coder BarrMan's Avatar
    Join Date
    Feb 2005
    Location
    Israel.
    Posts
    1,644
    Thanks
    69
    Thanked 83 Times in 82 Posts
    1. Where is the BTW?
    2. how can I do the query and what is it?
    and 3 I'm sorry, I didnt know.


  •  

    Posting Permissions

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