Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2002
    Location
    NW Iowa
    Posts
    185
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Looping through recordset until end?

    I'm using a 3rd party calendar script with highlighting by days, and I'd like to use it for a "calendar of events". However, the script is set to use static days, but I'm hoping I could loop through my recordset highlighting all days where events are occurring, unfortunately, I can't find good example code online on how to accomplish this with the right results.

    Here is the code that I would like to loop through:
    Code:
    oCalendar.AddHightlight(rs_events.Fields.Item("f_datestart").Value)
    If you need more information, please let me know,
    Thanks in advance,
    Matt

  • #2
    Regular Coder
    Join Date
    Dec 2002
    Location
    NW Iowa
    Posts
    185
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Sorry, nevermind, I got it figured out. For those that hit this by searching, here was the fix:

    <%
    Dim RepeatRows
    Dim RepeatIndex

    RepeatRows = -1
    RepeatIndex = 0
    rs_events_numRows = rs_events_numRows + RepeatRows
    %>

    <%
    While ((RepeatRows <> 0) AND (NOT rs_events.EOF))
    oCalendar.AddHightlight(rs_events.Fields.Item("f_datestart").Value)
    RepeatIndex=RepeatIndex+1
    RepeatRows=RepeatRows-1
    rs_events.MoveNext()
    Wend
    %>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •