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="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href = "<%response.write "message.asp?entry=" & oRs("code"
%>"><%=oRs("topic"
%></a>
but it starts from here:
if oRs.recordcount <> 0 then
oRs.AbsolutePage = PageNo
For j = 1 to oRs.PageSize%>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href = "<%response.write "message.asp?entry=" & oRs("code"
%>"><%=oRs("topic"
%></a>
this is the entire code, please help.
I need to have it ready tomorrow.
<% @ LANGUAGE = "VBSCRIPT" %>
<% response.buffer=True
response.expires = 0 %>
<!--#include File="adovbs.inc"-->
<%
'*********************************************************************************************
'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 "C:\Inetpub\ for PWS)
' *Create a folder called forum or whatever you like and place all the files in there (except "ForumDb.mdb"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
' *Inside this folder, create another folder called "db" and copy the file "ForumDb.mdb" into it
' *Open your browser and enter the URL "' Any problem, feel free to e-mail me
' mautheman@yahoo.com
'**********************************************************************************************
if request.servervariables("CONTENT_LENGTH"
<> 0 and Request("Mv"
= "" then
name = server.HtmlEncode(request.form("txtName"
)
email = server.HtmlEncode(request.form("txtEmail"
)
topic = server.HtmlEncode(request.form("txtTopic"
)
message = request.form("txtMessage"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
ref = request.form("reference"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
if name = "" or email = "" or topic = "" or message = "" then
response.redirect ("post.asp?err=true&ref=" & ref)
end if
message = replace(server.HTMLEncode(message),VBCrlf, "<BR>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set oConn=Server.CreateObject("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set oRs=Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
oConn.Open "DSN=tttDB;UID=scott;PWD=tiger"
oRs.Open "SELECT * from My_Forum", oConn, 1,3
if oRs.recordcount <> 0 then
oRs.movelast
ult = oRs("code"
+ 1
else
ult = 1
end if
oRs.addnew
oRs("Code"
= ult
oRs("reference"
= ref
oRs("name"
= name
oRs("email"
= email
oRs("topic"
= topic
oRs("message"
= message
oRs("PostDate"
= date
oRs.update
set oRs = nothing
set oConn = nothing
response.redirect ("done.asp"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
end if
'**********************************************************************************************
Set oConn=Server.CreateObject("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set oRs=Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
oConn.Open "DSN=tttDB;UID=scott;PWD=tiger"
Mv = request.querystring("direction"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
If request.querystring("page"
= "" Then
PageNo = 1
Else
PageNo = request.querystring("page"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
End If
Set oRs = Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
oRs.Open "SELECT * from My_Forum where reference = -1", oConn
oRs.PageSize = 5
If Mv = "previous" or Mv = "next" Then
Select Case Mv
Case "previous"
If PageNo > 1 Then
PageNo = PageNo - 1
Else
PageNo = 1
End If
Case "next"
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="Content-Type" content="text/html; charset=iso-8859-1">
<style TYPE="text/css">
<!--
A:link {color:yellow;}
A:visited {color:yellow;}
A:hover {color:red;}
A:active {color:red;}
A {text-decoration:none}
-->
</style>
</head>
<body bgcolor="#009999" text="#FFFFFF" link="#FFFF00" vlink="#FFFF00">
<Form Action="" Method="POST" name="">
<div align="center">
<table width="75%" border="1">
<tr bgcolor="#999999" bordercolor="#FFFF00">
<td>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><b><font color="#000099">Forum</font></b></font></div>
</td>
</tr>
</table>
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#99FFFF"><a href="post.asp?type=new"><br>
</a></font></b>
<table width="43%" border="0">
<tr bgcolor="#333333" bordercolor="#FFFF00">
<td>
<div align="center"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#99FFFF"><a href="post.asp?type=new">*
Post a new message *</a></font></b></div>
</td>
</tr>
</table>
<% If oRs.recordcount <> 0 then %> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#00FFFF"><b>Page
<%=PageNo%> of <%=oRs.PageCount%></b></font><br>
<% If PageNo > 1 Then %>| <a href ="<%= request.servervariables("script_name"
%>?page=<%=PageNo%>&direction=previous"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Previous
Page </b></font></a> |<% End If %> <%If PageNo < oRs.PageCount Then %>| <a href ="<%= request.servervariables("script_name"
%>?page=<%=PageNo%>&direction=next"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Next
Page</b></font></a> |<% End If%> <br>
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#99FFFF"><a href="post.asp?type=new">
</a></font></b>
<%end if%>
<hr>
<br>
<table width="80%" border="0">
<tr>
<td><%
if oRs.recordcount <> 0 then
PageNo = oRs.AbsolutePage
For j = 1 to oRs.PageSize%>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href = "<%response.write "message.asp?entry=" & oRs("code"
%>"><%=oRs("topic"
%></a>
( <a href = "<%response.write "mailto:" & oRs("email"
%>"><%=oRs("name"
%></a>
) - <%=oRs("PostDate"
%> </font> <%
Set oRs2 = Server.CreateObject("ADODB.Recordset"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
oRs2.Open "SELECT * from My_Forum where reference = " & oRs("code"
, oConn, 1,3
if oRs2.recordcount <> 0 then %>
<table width="91%" border="0">
<tr bgcolor="#666666">
<td> <% oRs2.movefirst
while not oRs2.EOF
%>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#99FFFF">
* * <a href = "<%response.write "message.asp?entry=" & oRs2("code"
%>"><%=oRs2("topic"
%></a>
( <a href = "<%response.write "mailto:" & oRs2("email"
%>"><%=oRs2("name"
%></a>
) - <%=oRs2("PostDate"
%> * *</font></div>
<%
oRs2.movenext
wend%> </td>
</tr>
</table>
<%
set oRs2 = nothing
end if%> <%
response.write "<hr>"
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="Verdana, Arial, Helvetica, sans-serif" size="2" color="#66FFFF">It
seems like there are no messages yet...would you like to be the first? <a href="post.asp?type=new">click
here </a></font></b><% end If %>
<hr>
<center>
</center>
</div>
<div align="center">
</div>
<div align="center"><br>
<table width="63%" border="1" bgcolor="#000000" bordercolor="#FFFF00">
<tr>
<td width="50%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href="forum.asp">Forum</a></font></div>
</td>
<td width="50%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<a href="post.asp?type=new">Post new message</a></font></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">This
forum was developed by <a href="mailto:mautheman@yahoo.com">Mau the
Man</a></font></div>
</td>
</tr>
</table>
<% if InStr(1,request.servervariables("HTTP_USER_AGENT"
,"MSIE"
> 7 then %><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
You are using Internet Explorer</font> <%else%> <font face="Verdana, Arial, Helvetica, sans-serif" size="1">You
are using Netscape Navigator</font> <%end if%> </div>
</form>
</body>
</html>
It keeps giving this error:
Error Type:
(0x80020009)
Exception occurred.
/My_Message_Board/forum.asp, line 152
which is:
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href = "<%response.write "message.asp?entry=" & oRs("code"
but it starts from here:
if oRs.recordcount <> 0 then
oRs.AbsolutePage = PageNo
For j = 1 to oRs.PageSize%>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href = "<%response.write "message.asp?entry=" & oRs("code"
this is the entire code, please help.
I need to have it ready tomorrow.
<% @ LANGUAGE = "VBSCRIPT" %>
<% response.buffer=True
response.expires = 0 %>
<!--#include File="adovbs.inc"-->
<%
'*********************************************************************************************
'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 "C:\Inetpub\ for PWS)
' *Create a folder called forum or whatever you like and place all the files in there (except "ForumDb.mdb"
' *Inside this folder, create another folder called "db" and copy the file "ForumDb.mdb" into it
' *Open your browser and enter the URL "' Any problem, feel free to e-mail me
' mautheman@yahoo.com
'**********************************************************************************************
if request.servervariables("CONTENT_LENGTH"
name = server.HtmlEncode(request.form("txtName"
email = server.HtmlEncode(request.form("txtEmail"
topic = server.HtmlEncode(request.form("txtTopic"
message = request.form("txtMessage"
ref = request.form("reference"
if name = "" or email = "" or topic = "" or message = "" then
response.redirect ("post.asp?err=true&ref=" & ref)
end if
message = replace(server.HTMLEncode(message),VBCrlf, "<BR>"
Set oConn=Server.CreateObject("ADODB.Connection"
Set oRs=Server.CreateObject("ADODB.Recordset"
oConn.Open "DSN=tttDB;UID=scott;PWD=tiger"
oRs.Open "SELECT * from My_Forum", oConn, 1,3
if oRs.recordcount <> 0 then
oRs.movelast
ult = oRs("code"
else
ult = 1
end if
oRs.addnew
oRs("Code"
oRs("reference"
oRs("name"
oRs("email"
oRs("topic"
oRs("message"
oRs("PostDate"
oRs.update
set oRs = nothing
set oConn = nothing
response.redirect ("done.asp"
end if
'**********************************************************************************************
Set oConn=Server.CreateObject("ADODB.Connection"
Set oRs=Server.CreateObject("ADODB.Recordset"
oConn.Open "DSN=tttDB;UID=scott;PWD=tiger"
Mv = request.querystring("direction"
If request.querystring("page"
PageNo = 1
Else
PageNo = request.querystring("page"
End If
Set oRs = Server.CreateObject("ADODB.Recordset"
oRs.Open "SELECT * from My_Forum where reference = -1", oConn
oRs.PageSize = 5
If Mv = "previous" or Mv = "next" Then
Select Case Mv
Case "previous"
If PageNo > 1 Then
PageNo = PageNo - 1
Else
PageNo = 1
End If
Case "next"
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="Content-Type" content="text/html; charset=iso-8859-1">
<style TYPE="text/css">
<!--
A:link {color:yellow;}
A:visited {color:yellow;}
A:hover {color:red;}
A:active {color:red;}
A {text-decoration:none}
-->
</style>
</head>
<body bgcolor="#009999" text="#FFFFFF" link="#FFFF00" vlink="#FFFF00">
<Form Action="" Method="POST" name="">
<div align="center">
<table width="75%" border="1">
<tr bgcolor="#999999" bordercolor="#FFFF00">
<td>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="3"><b><font color="#000099">Forum</font></b></font></div>
</td>
</tr>
</table>
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#99FFFF"><a href="post.asp?type=new"><br>
</a></font></b>
<table width="43%" border="0">
<tr bgcolor="#333333" bordercolor="#FFFF00">
<td>
<div align="center"><b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#99FFFF"><a href="post.asp?type=new">*
Post a new message *</a></font></b></div>
</td>
</tr>
</table>
<% If oRs.recordcount <> 0 then %> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#00FFFF"><b>Page
<%=PageNo%> of <%=oRs.PageCount%></b></font><br>
<% If PageNo > 1 Then %>| <a href ="<%= request.servervariables("script_name"
Page </b></font></a> |<% End If %> <%If PageNo < oRs.PageCount Then %>| <a href ="<%= request.servervariables("script_name"
Page</b></font></a> |<% End If%> <br>
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#99FFFF"><a href="post.asp?type=new">
</a></font></b>
<%end if%>
<hr>
<br>
<table width="80%" border="0">
<tr>
<td><%
if oRs.recordcount <> 0 then
PageNo = oRs.AbsolutePage
For j = 1 to oRs.PageSize%>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href = "<%response.write "message.asp?entry=" & oRs("code"
( <a href = "<%response.write "mailto:" & oRs("email"
) - <%=oRs("PostDate"
Set oRs2 = Server.CreateObject("ADODB.Recordset"
oRs2.Open "SELECT * from My_Forum where reference = " & oRs("code"
if oRs2.recordcount <> 0 then %>
<table width="91%" border="0">
<tr bgcolor="#666666">
<td> <% oRs2.movefirst
while not oRs2.EOF
%>
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#99FFFF">
* * <a href = "<%response.write "message.asp?entry=" & oRs2("code"
( <a href = "<%response.write "mailto:" & oRs2("email"
) - <%=oRs2("PostDate"
<%
oRs2.movenext
wend%> </td>
</tr>
</table>
<%
set oRs2 = nothing
end if%> <%
response.write "<hr>"
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="Verdana, Arial, Helvetica, sans-serif" size="2" color="#66FFFF">It
seems like there are no messages yet...would you like to be the first? <a href="post.asp?type=new">click
here </a></font></b><% end If %>
<hr>
<center>
</center>
</div>
<div align="center">
</div>
<div align="center"><br>
<table width="63%" border="1" bgcolor="#000000" bordercolor="#FFFF00">
<tr>
<td width="50%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><a href="forum.asp">Forum</a></font></div>
</td>
<td width="50%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<a href="post.asp?type=new">Post new message</a></font></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1">This
forum was developed by <a href="mailto:mautheman@yahoo.com">Mau the
Man</a></font></div>
</td>
</tr>
</table>
<% if InStr(1,request.servervariables("HTTP_USER_AGENT"
You are using Internet Explorer</font> <%else%> <font face="Verdana, Arial, Helvetica, sans-serif" size="1">You
are using Netscape Navigator</font> <%end if%> </div>
</form>
</body>
</html>