Irriterende fejl!
Hej Eksperter.Får en irriterende fejl på line 40 i mit dokument:
error '80020009'
/resources/includes/functions.asp, line 40
Mit dokument ser således ud:
<%
Function SubtractOneWeek(dDate)
SubtractOneWeek = DateAdd("ww", -1, dDate)
End Function
Function AddOneWeek(dDate)
AddOneWeek = DateAdd("ww", 1, dDate)
End Function
Function GetWeekTitle(dDate)
Dim n 'number value for day of the week.
Dim dTitle 'displays date for sunday of the input date week.
n = Weekday(dDate, 1)
dTitle = "" & DateAdd("w", 1-n, dDate)
GetWeekTitle = dTitle
End Function
Function ShowWeek(dDate)
Dim k 'number value for day of the week.
Dim i 'counter.
Dim dTemp 'temporary holder for calendar disply data.
k = Weekday(dDate, 1)
i = 1
Do Until i = 8
counter = DateAdd("w", i-k, dDate)
strDay = Day(counter)
strMonth = Month(counter)
strYear = Year(counter)
strDate = strYear&"/"&strMonth&"/"&strDay
strSQL = "Select tbl_closed.*,tbl_lukketyper.id,tbl_lukketyper.type AS LukType from tbl_closed Inner JOIN tbl_lukketyper ON tbl_lukketyper.id = tbl_closed.type Where dato = '"&strDate&"' and frisor = "&request.querystring("f")&""
Set RsClosed = objConn.execute(strSQL)
strSQL = "Select tbl_hours.*,tbl_ugedage.ugedag AS Navne, tbl_ugedage.id from tbl_hours INNER JOIN tbl_ugedage ON tbl_ugedage.id = tbl_hours.ugedag Where frisor = "&strFrisorSalon&" AND tbl_ugedage.ugedag = '"&WeekDayName(Weekday(DateAdd("w", i-k, dDate), 1))&"'"
Set RsDaysClosed = objConn.execute(strSQL)
HER ER LINE 40: if RsDaysClosed("lukket") = "Ja" or RsClosed.eof = "False" then
dTemp = dTemp & "<tr><td bgcolor=#c0c0c0 width=100px>"
if RsClosed.eof = True then
dTemp = dTemp & "<b>" & WeekDayName(Weekday(DateAdd("w", i-k, dDate), 1)) & "</b><br />" & DateAdd("w", i-k, dDate) & "</td><td width="150px" bgcolor=#c0c0c0>"&strLukket&"</td></tr>"
else
dTemp = dTemp & "<b>" & WeekDayName(Weekday(DateAdd("w", i-k, dDate), 1)) & "</b><br />" & DateAdd("w", i-k, dDate) & "</td><td width=150px bgcolor=#c0c0c0>"&RsClosed("Luktype")&"</td></tr>"
end if
else
if dDate < date() or Request.querystring("p") = "" then
dTemp = dTemp & "<tr><td bgcolor=#c0c0c0 width=100px>"
dTemp = dTemp & "<b>" & WeekDayName(Weekday(DateAdd("w", i-k, dDate), 1)) & "</b><br />" & DateAdd("w", i-k, dDate) & "</td><td width="150px" bgcolor=#c0c0c0></td></tr>"
else
If i = k Then
dTemp = dTemp & "<tr><td bgcolor=#a0a0a0 width=100px><b><a href=booking_s4.asp?f="&request.querystring("f")&"&p="&request.querystring("p")&"&date=" & DateAdd("w", i-k, dDate) & ">" & WeekDayName(Weekday(DateAdd("w", i-k, dDate), 1)) & "</a></b><br /><font color=#000099>" & DateAdd("w", i-k, dDate) & "</font></td><td width="150px" bgcolor=#a0a0a0></td></tr>"
Else
dTemp = dTemp & "<tr><td bgcolor=#c0c0c0 width=100px><b><a href=booking_s4.asp?f="&request.querystring("f")&"&p="&request.querystring("p")&"&date=" & DateAdd("w", i-k, dDate) & ">" & WeekDayName(Weekday(DateAdd("w", i-k, dDate), 1)) & "</a></b><br />" & DateAdd("w", i-k, dDate) & "</td><td width="150px" bgcolor=#c0c0c0></td></tr>"
End if
End If
end if
i = i + 1
Loop
ShowWeek = dTemp
End Function
%>