Error Type: (0x80020009) Exception occurred.

Error Type: (0x80020009) Exception occurred.

am 13.02.2006 18:57:05 von si

I get the following error from the code below:

Error Type: (0x80020009)
Exception occurred.
/diary.asp, line 53


The specific part that causes the exception is when I try to access
rsAppsTemp("AppointmentDate") in the While loop. For some reason it works
fine in the If statement above it, but not in the While loop.

Any ideas?


=========

Function DiaryEntry(DBDate, LoopDate, HourVal, rsAppsTemp)
If IsDate(rsAppsTemp("AppointmentDate")) And IsNumeric(LoopDate) And
IsNumeric(HourVal) And Not rsAppsTemp.EOF Then 'validate input
If Day(rsAppsTemp("AppointmentDate")) = LoopDate Then ' LoopDate is a
date value representing day of month from 1 to 31
If CInt(Hour(rsAppsTemp("AppointmentDate"))) = CInt(HourVal) Then '
HourVal represents the hour from 0 to 23
While CInt(Hour(rsAppsTemp("AppointmentDate"))) = CInt(HourVal) 'THIS
IS LINE 53
Response.write rsAppsTemp("Postcode") & " (" &
ShortenString(rsAppsTemp("BusinessName"), 10) & ") " & "
"
rsAppsTemp.MoveNext
Wend
Else
Response.write " "
End If
End If
End If
End Function