Problem i forum :D
Daws, jeg har et problem :Derror '80020009'
Exception occurred.
/fiskebolle/forum.asp, line 81
den fejl kommer når jeg går helt ind hvor POSTS skulle være i mit forum :D
KODEN:
<% If NOT Request.Querystring("ForumID") = Empty AND NOT Request.Querystring("TopicID") = Empty Then %>
<html>
<head>
<title>FORUM !!! - Fiske-Bolle !</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table width="500" border="0" cellspacing="1" cellpadding="4">
<tr>
<td width="100%"><font class="stor">Forum</font></td>
</tr>
</table>
<br>
<table width="500" border="0" cellspacing="1" cellpadding="4">
<tr>
<td width="20%"><font class="stor">Poster</font></td> <td width="80%"><font class="stor">Emne:</font></td>
</tr>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("database.mdb")
Conn.Open DSN
strSQL = "Select * from posts WHERE (TopicID = '" & Request.Querystring("TopicID") & "')"
Set rs = Conn.Execute(strSQL)
Do
Response.Write("<tr><td>" & rs("Poster") & "</td><td>" & rs("Post_Tekst") & "</td></tr>")
rs.MoveNext
Loop While Not rs.EOF
Conn.Close
Set Conn = Nothing
%>
</table>
</body>
</html>
<% end if %>
<% if NOT Request.Querystring("ForumID") = Empty Then %>
<html>
<head>
<title>FORUM !!! - Fiske-Bolle !</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table width="500" border="0" cellspacing="1" cellpadding="4">
<tr>
<td width="100%"><font class="stor">Forum</font></td>
</tr>
</table>
<br>
<table width="500" border="0" cellspacing="1" cellpadding="4">
<tr>
<td width="40%"><font class="stor">Topic Navn</font></td> <td width="20%"><font class="stor"><center>Topic Starter</center></font></td> <td width="20%"><font class="stor"><center>Svar</center></font></td><td width="20%"><font class="stor"><center>Læst</center></font></td>
</tr>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("database.mdb")
Conn.Open DSN
strSQL = "Select * from topics WHERE (ForumID = '" & Request.Querystring("ForumID") & "')"
Set rs = Conn.Execute(strSQL)
Do
Response.Write("<tr><td><font class='stor'><a href='forum.asp?ForumID=" & Request.Querystring("ForumID") & "?TopicID=" & rs("TopicID") & "'>" & rs("Topic_Navn") & "</a></font></td><td><font class='stor'><center>" & rs("Topic_Starter") & "</center></font></td><td><font class='stor'><center>1</center></font></td><td><font class='stor'><center>1</center></font></td></tr>")
rs.MoveNext
Loop While Not rs.EOF
Conn.Close
Set Conn = Nothing
%>
</table>
</body>
</html>
<% end if %>
<% If Request.Querystring("ForumID") = Empty AND Request.Querystring("TopicID") = Empty Then %>
<html>
<head>
<title>FORUM !!! - Fiske-Bolle !</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table width="500" border="0" cellspacing="1" cellpadding="4">
<tr>
<td width="100%"><font class="stor">Forum</font></td>
</tr>
</table>
<br>
<table width="500" border="0" cellspacing="1" cellpadding="4">
<tr>
<td width="60%"><font class="stor">Navn</font></td> <td width="20%"><font class="stor"><center>Topics</center></font></td> <td width="20%"><font class="stor"><center>Posts</center></font></td>
</tr>
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; "
DSN = DSN & "DBQ=" & Server.MapPath("database.mdb")
Conn.Open DSN
strSQL = "Select * from Forums order by Forum_Navn"
Set rs = Conn.Execute(strSQL)
Do
Response.Write("<tr><td><font class='stor'><a href='forum.asp?ForumID=" & rs("ForumID") & "'>" & rs("Forum_Navn") & "</a></font><br><font class='lille'>" & rs("Forum_Beskrivelse") & "</font></td><td><font class='stor'><center>1</center></font></td><td><font class='stor'><center>2</center></font></td></td></tr>")
rs.MoveNext
Loop While Not rs.EOF
Conn.Close
Set Conn = Nothing
%>
</table>
</body>
</html>
<% end if %>
