Booking problem

Tags:    asp

Jeg kan ikke løse denne her gåde:

Den melder fejl : error '80020009'

Hvad kan der være galt og kan jeg overhovedet gribe det an således mht at få vist bookede tider ?

- Mark

<% session.lcid = 1030 %>
<html>

<head>
<meta http-equiv="Content-Language" content="da">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<script LANGUAGE="JavaScript" SRC="openwindow.js"></script>
<title>Booking</title>
</head>
<%
if request.querystring("dato") = "" then
response.redirect "default.asp?dato=" & date &""
end if
%>
<%
if request.form("dag") <> "" and request.form("maaned") <> "" and request.form("aar") then
response.redirect "default.asp?dato=" & request.form("dag") & "-" & request.form("maaned") & "-" & request.form("aar") &""
end if
%>

<body>
<form method="POST" action="default.asp">
<p><select name="dag" size="1">
<option value="">Dag</option>
<option value="01">1.</option>
<option value="02">2.</option>
<option value="03">3.</option>
<option value="04">4.</option>
<option value="05">5.</option>
<option value="06">6.</option>
<option value="07">7.</option>
<option value="08">8.</option>
<option value="09">9.</option>
<option value="10">10.</option>
<option value="11">11.</option>
<option value="12">12.</option>
<option value="13">13.</option>
<option value="14">14.</option>
<option value="15">15.</option>
<option value="16">16.</option>
<option value="17">17.</option>
<option value="18">18.</option>
<option value="19">19.</option>
<option value="20">20.</option>
<option value="21">21.</option>
<option value="22">22.</option>
<option value="23">23.</option>
<option value="24">24.</option>
<option value="25">25.</option>
<option value="26">26.</option>
<option value="27">27.</option>
<option value="28">28.</option>
<option value="29">29.</option>
<option value="30">30.</option>
<option value="31">31.</option>
</select>
-
<select name="maaned" size="1">
<option value="">Måned</option>
<option value="01">Januar</option>
<option value="02">Februar</option>
<option value="03">Marts</option>
<option value="04">April</option>
<option value="05">Maj</option>
<option value="06">Juni</option>
<option value="07">Juli</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">Oktober</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
-
<select name="aar" size="1"
><option value="">År</option>
<option value="2006">2006</option>
<option value="2007">2007</option>
<option value="2008">2008</option>
<option value="2009">2009</option>
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
</select>
<input type="submit" value="Vis" name="B1"></p>
<p><b><font face="Arial" size="2">Herunder vises bookings for d: <%=request.querystring("dato")%></font></b>
</p>
</form>
<%
Set conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="&Server.MapPath("db.mdb")
sql = "select * from bookings where dato = "& request.querystring("dato") &""
response.write sql
Set rs = Conn.Execute(sql)
%>
<table border="0" width="562" id="table1" height="319">
<tr>
<td height="19" width="64" style="border-right: 1px solid #000000; border-bottom: 1px solid #000000">
<p align="center"><font face="Arial" size="2"><b>Tid</b></font></td>
<td height="19" width="98" align="center" style="border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>Båd 1</b></font></td>
<td height="19" width="98" align="center" style="border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>Båd 2</b></font></td>
<td height="19" width="98" align="center" style="border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>Båd 3</b></font></td>
<td height="19" width="98" align="center" style="border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>Båd 4</b></font></td>
<td height="19" align="center" style="border-left: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000" width="99">
<font face="Arial" size="2"><b>Båd 5</b></font></td>
</tr>
<tr>
<td height="36" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>08:00</b></font></td>
<%if rs("tid") = "0800" AND rs("baad") = "1" then%>
<td height="37" width="98" style="cursor:hand" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=08:00',630,250)" style="cursor: hand;" bgcolor="#CC0000">
<p align="center"><b><font size="2" face="Arial"><%=rs("navn")%></font></b></td>
<%else%>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=08:00',630,250)" style="cursor: hand;"><%=rs("navn")%></td>
<%end if%>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=08.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=08.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=08.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=08.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="36" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>10:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=10.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=10.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=10.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=10.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=10.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="37" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>12:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=12.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=12.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=12.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=12.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=12.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="37" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>14:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=14.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=14.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=14.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=14.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=14.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="37" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>16:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=16.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=16.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=16.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=16.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=16.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="37" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>18:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=18.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=18.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=18.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=18.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=18.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="37" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>20:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=20.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=20.00',630,250)" style="cursor: hand;"> </td>
<% if cstr(rs("tid")) = "2000" AND cstr(rs("baad")) = "4" then%>
<td height="37" width="98" style="cursor:hand" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=08:00',630,250)" style="cursor: hand;" bgcolor="#CC0000">
<p align="center"><b><font size="2" face="Arial"><%=rs("navn")%></font></b></td>
<%else%>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=08:00',630,250)" style="cursor: hand;"><%=rs("navn")%></td>
<%end if%>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=20.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=20.00',630,250)" style="cursor: hand;"> </td>
</tr>
<tr>
<td height="37" width="64" align="right" valign="top" style="border-right: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000">
<font face="Arial" size="2"><b>22:00</b></font></td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=1&bookingdato=<%=request.querystring("dato")%>&tid=22.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=2&bookingdato=<%=request.querystring("dato")%>&tid=22.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=3&bookingdato=<%=request.querystring("dato")%>&tid=22.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=4&bookingdato=<%=request.querystring("dato")%>&tid=22.00',630,250)" style="cursor: hand;"> </td>
<td height="37" width="98" style="border: 1px solid #000000" onclick="javascript:OpenWindow('book.asp?baad=5&bookingdato=<%=request.querystring("dato")%>&tid=22.00',630,250)" style="cursor: hand;"> </td>
</tr>
</table>

</body>

</html>



4 svar postet i denne tråd vises herunder
2 indlæg har modtaget i alt 2 karma
Sorter efter stemmer Sorter efter dato
Din noob. Du checker ikke om rs er nothing



Jeg har selv været rundt for at løse problemet selv, men uden held, ingen records er slettet

de er godt nok manuelt indtastet men det burde vel ikke gøre en forskel.

Du kan prøve at læse her:
http://classicasp.aspfaq.com/general/why-do-i-get-80020009-errors.html




Hvilken linie giver fejlen?



t