Exception occurred ?!?
Hej alleFår denne her fejl:
fejl '80020009'
Exception occurred.
/wfamaps/GetMap.asp, linje 19
Jeg får den kun jeg jeg bruger:
GetMap.asp?MapID=2&Comment=Yes
Men ikke når jeg bruger denne her:
GetMap.asp?MapID=1&Comment=Yes
Her er min kode:
<% Response.Buffer = True %>
<%
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/Main.mdb")
Set rs = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM Maps WHERE (MapID = " & Request.QueryString("MapID") & ")"
rs.Open strSQL, myConn, 1, 3
%>
<%
if request("Comment")="Yes" then
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("db/Comment.mdb")
Set rs1 = Server.CreateObject("ADODB.RecordSet")
strSQL = "SELECT * FROM Comment WHERE (MapID = " & Request.QueryString("MapID") & ") ORDER By Date DESC"
rs1.Open strSQL, myConn, 1, 3
End If
%>
<%
Select Case month(rs1("Date"))
case 1 maaned = " Januar "
case 2 maaned = " Februar "
case 3 maaned = " Marts "
case 4 maaned = " April "
case 5 maaned = " Maj "
case 6 maaned = " Juni "
case 7 maaned = " Juli "
case 8 maaned = " August "
case 9 maaned = " September "
case 10 maaned = " Oktober "
case 11 maaned = " November "
case 12 maaned = " December "
End Select
%>
<html>
<head>
<style>
<!--
A:link {text-decoration: none; color: #FFFFFF}
A:visited {text-decoration: none; color: #FFFFFF}
A:hover {text-decoration: underline; background=#222222; color: #FFFFFF}
A:active {text-decoration: none; color: #Fonts (seperate with comma)}
-->
</style>
<title>Download Map</title>
</head>
<body text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" bgcolor="#000000">
<b><font face="Tahoma" size="2">
<p align="center"></font><u><font size="2" face="Verdana">Disclaimer</font></u></b></p>
<p align="center"><strong><small><font face="Verdana">WFA-DK</font></small></strong><font
size="2" face="Verdana"> can not be held responsible for contents of the files, contained
within this archive.<br>
Neither can we be held responsible for virus infections and other damage inflicted to
any <br>
PC system, directly or indirectly caused by downloading one or more files from this
archive.<br>
If you cannot agree on these terms, please leave this page now.<br>
<br>
</font><font size="2"></p>
<form method="POST" action="Download_Script.asp?MapID=<%=RS("MapID")%>">
<div align="center"><center><p><input type="submit"
value="Click Here to Download --> <%=RS("Map_Filename")%>"></p>
</center></div>
</form>
<table border="0" cellpadding="2" cellspacing="0">
<tr>
<td><font size="2" face="Verdana">Comment</font></td>
</tr>
<tr>
<td><% Response.Write("<hr>")%>
<% Do While Not rs1.EOF %>
</td>
</tr>
<tr>
<td><font size="2" face="Verdana"><%=Replace(rs1("Comment")&"", vbCrLf, "<BR>")%> </font></td>
</tr>
<tr>
<td><font size="2" face="Verdana">By: <a href="mailto:<%=RS1("Email")%>"><%=RS1("Name")%></a></font></td>
</tr>
<tr>
<td><font size="2" face="Verdana">Date: <% response.write day(rs1("Date")) & maaned & year(rs1("Date"))%></font></td>
</tr>
<tr>
<td><% Response.write("<hr>")%>
<%rs1.Movenext
Loop
%>
</td>
</tr>
</table>
<%
myConn.Close
Set myConn = Nothing
%>
<form method="POST" action="Comment.asp">
<input type="hidden" name="MapID" value="<%=Request("MapID")%>"><input type="hidden"
name="Url" value="GetMap.asp?MapID=<%=Request("MapID")%>&Comment=Yes"><p><font
size="2" face="Verdana">Write a Comment</font></p>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td><font size="2" face="Verdana">Your Name:</font></td>
<td><input type="text" name="Name" size="20" style="border: medium none"></td>
</tr>
<tr>
<td><font size="2" face="Verdana">Email:</font></td>
<td><input type="text" name="Email" size="20" style="border: medium none"></td>
</tr>
<tr>
<td valign="top"><font size="2" face="Verdana">Comment</font></td>
<td><textarea rows="5" name="Comment" cols="34" style="border: medium none"></textarea></td>
</tr>
</table>
<p><input type="submit" value="Add Comment"></p>
</form>
</font>
</body>
</html>
Håber at der er en der kan hjælpe mig :)
Mvh
<% Wall %>
Sorry koden er lidt rodet