calendar array not displaying first event of every month
creating an array of calendar events from a recordset. i use 'select count' to make sure there are records for the month selected, if so, i put them into the array.
the problem is that if there is only one event for the first day of the month it won't display it. if there are two events on the first day it will start with the second event on the first day. all other days for every month display fine... its just the very first event for the very first day of every month. i'm using get.rows to create my array.
i've also written out the array and manually counted the number of events for a given month and checked it against the 'select count' method and both numbers match. it seems the problem isn't with getting the info from the database, but with writing out the array.
arrays always start at 0, not 1... just make sure you get the info beginning at 0
thanks, but i am starting with 0.
if i do this...
i get a 'ID' , 'EVENT NAME' list. the funny thing is that it will actually display the ID number for that first event of the month but the EVENT NAME is still empty. so it knows its there, it just won't display it...
<% for iiii = 0 to UBound(eventsArray,2) %>
<% response.write eventsArray(0,iiii) & " , "& eventsArray(2,iiii) & "<br>" %>
<% Next %>
figured it out
this is why it wasn't working...
as soon as i commented out the two variables everything worked fine. i don't know how or why but the vars were grabbing the values in the recordset first so that the array couldn't use them. turns out i wasn't even using those variables anymore so all is well.
dbday = calendar.Fields.Item("day").Value
dbevent = calendar.Fields.Item("subject").Value
eventsArray = calendar.getrows
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)