Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Please tell me you know the solution!!!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
This is one of the those annoying codes.
It keeps giving this error:
Error Type:
(0x80020009)
Exception occurred.
/My_Message_Board/forum.asp, line 152

which is:
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;><a href = &quot;<%response.write &quot;message.asp?entry=&quot; & oRs(&quot;code&quot;)%>&quot;><%=oRs(&quot;topic&quot;)%></a>
but it starts from here:

if oRs.recordcount <> 0 then
oRs.AbsolutePage = PageNo
For j = 1 to oRs.PageSize%>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;><a href = &quot;<%response.write &quot;message.asp?entry=&quot; & oRs(&quot;code&quot;)%>&quot;><%=oRs(&quot;topic&quot;)%></a>



this is the entire code, please help.
I need to have it ready tomorrow.

<% @ LANGUAGE = &quot;VBSCRIPT&quot; %>
<% response.buffer=True
response.expires = 0 %>
<!--#include File=&quot;adovbs.inc&quot;-->
<%
'*********************************************************************************************
'January/2000
'This Forum was developed by MauTheMan
'This is a fully functional forum made with ASP
'
'To have this code working in your house you need to have PWS or IIS installed
'PWS can be found in the win98 CD
' How to have the forum running in win98
' *You need to be in the folder where your server stores the web pages (usually &quot;C:\Inetpub\ for PWS)
' *Create a folder called forum or whatever you like and place all the files in there (except &quot;ForumDb.mdb&quot;)
' *Inside this folder, create another folder called &quot;db&quot; and copy the file &quot;ForumDb.mdb&quot; into it
' *Open your browser and enter the URL &quot;' Any problem, feel free to e-mail me
' mautheman@yahoo.com
'**********************************************************************************************
if request.servervariables(&quot;CONTENT_LENGTH&quot;) <> 0 and Request(&quot;Mv&quot;) = &quot;&quot; then

name = server.HtmlEncode(request.form(&quot;txtName&quot;))
email = server.HtmlEncode(request.form(&quot;txtEmail&quot;))
topic = server.HtmlEncode(request.form(&quot;txtTopic&quot;))
message = request.form(&quot;txtMessage&quot;)
ref = request.form(&quot;reference&quot;)

if name = &quot;&quot; or email = &quot;&quot; or topic = &quot;&quot; or message = &quot;&quot; then
response.redirect (&quot;post.asp?err=true&ref=&quot; & ref)
end if

message = replace(server.HTMLEncode(message),VBCrlf, &quot;<BR>&quot;)


Set oConn=Server.CreateObject(&quot;ADODB.Connection&quot;)
Set oRs=Server.CreateObject(&quot;ADODB.Recordset&quot;)
oConn.Open &quot;DSN=tttDB;UID=scott;PWD=tiger&quot;

oRs.Open &quot;SELECT * from My_Forum&quot;, oConn, 1,3

if oRs.recordcount <> 0 then
oRs.movelast
ult = oRs(&quot;code&quot;) + 1
else
ult = 1
end if
oRs.addnew
oRs(&quot;Code&quot;) = ult
oRs(&quot;reference&quot;) = ref
oRs(&quot;name&quot;) = name
oRs(&quot;email&quot;) = email
oRs(&quot;topic&quot;) = topic
oRs(&quot;message&quot;) = message
oRs(&quot;PostDate&quot;) = date
oRs.update

set oRs = nothing
set oConn = nothing
response.redirect (&quot;done.asp&quot;)
end if

'**********************************************************************************************

Set oConn=Server.CreateObject(&quot;ADODB.Connection&quot;)
Set oRs=Server.CreateObject(&quot;ADODB.Recordset&quot;)
oConn.Open &quot;DSN=tttDB;UID=scott;PWD=tiger&quot;

Mv = request.querystring(&quot;direction&quot;)

If request.querystring(&quot;page&quot;) = &quot;&quot; Then
PageNo = 1
Else
PageNo = request.querystring(&quot;page&quot;)
End If

Set oRs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
oRs.Open &quot;SELECT * from My_Forum where reference = -1&quot;, oConn

oRs.PageSize = 5

If Mv = &quot;previous&quot; or Mv = &quot;next&quot; Then
Select Case Mv
Case &quot;previous&quot;
If PageNo > 1 Then
PageNo = PageNo - 1
Else
PageNo = 1
End If
Case &quot;next&quot;
If oRs.AbsolutePage < oRs.PageCount Then
PageNo = PageNo + 1
Else
PageNo = oRs.PageCount
End If
Case Else
PageNo = 1
End Select
End If
%>
<html>
<head>
<title>Forum</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<style TYPE=&quot;text/css&quot;>
<!--
A:link {color:yellow;}
A:visited {color:yellow;}
A:hover {color:red;}
A:active {color:red;}
A {text-decoration:none}
-->
</style>
</head>

<body bgcolor=&quot;#009999&quot; text=&quot;#FFFFFF&quot; link=&quot;#FFFF00&quot; vlink=&quot;#FFFF00&quot;>
<Form Action=&quot;&quot; Method=&quot;POST&quot; name=&quot;&quot;>
<div align=&quot;center&quot;>
<table width=&quot;75%&quot; border=&quot;1&quot;>
<tr bgcolor=&quot;#999999&quot; bordercolor=&quot;#FFFF00&quot;>
<td>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;3&quot;><b><font color=&quot;#000099&quot;>Forum</font></b></font></div>
</td>
</tr>
</table>
<b><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot; color=&quot;#99FFFF&quot;><a href=&quot;post.asp?type=new&quot;><br>
</a></font></b>
<table width=&quot;43%&quot; border=&quot;0&quot;>
<tr bgcolor=&quot;#333333&quot; bordercolor=&quot;#FFFF00&quot;>
<td>
<div align=&quot;center&quot;><b><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot; color=&quot;#99FFFF&quot;><a href=&quot;post.asp?type=new&quot;>*
Post a new message *</a></font></b></div>
</td>
</tr>
</table>
<% If oRs.recordcount <> 0 then %> <font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot; color=&quot;#00FFFF&quot;><b>Page
<%=PageNo%> of <%=oRs.PageCount%></b></font><br>
<% If PageNo > 1 Then %>| <a href =&quot;<%= request.servervariables(&quot;script_name&quot;) %>?page=<%=PageNo%>&direction=previous&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;><b>Previous
Page </b></font></a> |<% End If %> <%If PageNo < oRs.PageCount Then %>| <a href =&quot;<%= request.servervariables(&quot;script_name&quot;) %>?page=<%=PageNo%>&direction=next&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot;><b>Next
Page</b></font></a> |<% End If%> <br>
<b><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot; color=&quot;#99FFFF&quot;><a href=&quot;post.asp?type=new&quot;>
</a></font></b>
<%end if%>
<hr>
<br>
<table width=&quot;80%&quot; border=&quot;0&quot;>
<tr>
<td><%
if oRs.recordcount <> 0 then
PageNo = oRs.AbsolutePage
For j = 1 to oRs.PageSize%>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;><a href = &quot;<%response.write &quot;message.asp?entry=&quot; & oRs(&quot;code&quot;)%>&quot;><%=oRs(&quot;topic&quot;)%></a>
( <a href = &quot;<%response.write &quot;mailto:&quot; & oRs(&quot;email&quot;)%>&quot;><%=oRs(&quot;name&quot;)%></a>
) - <%=oRs(&quot;PostDate&quot;)%> </font> <%
Set oRs2 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
oRs2.Open &quot;SELECT * from My_Forum where reference = &quot; & oRs(&quot;code&quot;), oConn, 1,3
if oRs2.recordcount <> 0 then %>
<table width=&quot;91%&quot; border=&quot;0&quot;>
<tr bgcolor=&quot;#666666&quot;>
<td> <% oRs2.movefirst
while not oRs2.EOF
%>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot; color=&quot;#99FFFF&quot;>
* * <a href = &quot;<%response.write &quot;message.asp?entry=&quot; & oRs2(&quot;code&quot;)%>&quot;><%=oRs2(&quot;topic&quot;)%></a>
( <a href = &quot;<%response.write &quot;mailto:&quot; & oRs2(&quot;email&quot;)%>&quot;><%=oRs2(&quot;name&quot;)%></a>
) - <%=oRs2(&quot;PostDate&quot;)%> * *</font></div>
<%
oRs2.movenext
wend%> </td>
</tr>
</table>
<%
set oRs2 = nothing
end if%> <%
response.write &quot;<hr>&quot;
oRs.movenext
If oRs.EOF Then
Exit For
end if
Next
set oRs = nothing
set oConn = nothing
%> </div>
</td>
</tr>
</table>
<%else%> <b><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;2&quot; color=&quot;#66FFFF&quot;>It
seems like there are no messages yet...would you like to be the first? <a href=&quot;post.asp?type=new&quot;>click
here </a></font></b><% end If %>
<hr>
<center>
</center>
</div>
<div align=&quot;center&quot;>
</div>
<div align=&quot;center&quot;><br>
<table width=&quot;63%&quot; border=&quot;1&quot; bgcolor=&quot;#000000&quot; bordercolor=&quot;#FFFF00&quot;>
<tr>
<td width=&quot;50%&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;><a href=&quot;forum.asp&quot;>Forum</a></font></div>
</td>
<td width=&quot;50%&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;>
<a href=&quot;post.asp?type=new&quot;>Post new message</a></font></div>
</td>
</tr>
<tr>
<td colspan=&quot;2&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;>This
forum was developed by <a href=&quot;mailto:mautheman@yahoo.com&quot;>Mau the
Man</a></font></div>
</td>
</tr>
</table>
<% if InStr(1,request.servervariables(&quot;HTTP_USER_AGENT&quot;),&quot;MSIE&quot;) > 7 then %><font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;>
You are using Internet Explorer</font> <%else%> <font face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; size=&quot;1&quot;>You
are using Netscape Navigator</font> <%end if%> </div>
</form>
</body>
</html>
 
In this error
first of all try this..

Go to Services in Control panel and restart IIS service as well web publishing services.

Check this out first.. Rushi Shroff Rushi@emqube.com
&quot;Life is beautiful.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top