Print Page | Close Window

Needs Help with Calendar Application

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7336
Printed Date: 31 March 2026 at 9:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Needs Help with Calendar Application
Posted By: Misty
Subject: Needs Help with Calendar Application
Date Posted: 17 November 2003 at 12:13pm

I need some help with a calendar application that I created. There are about 282 lines of code so I really don't want to post all of it here.

I cannot get all of the events to display for a particular date on the calendar. Only one will show up. I think that it is because it doesn't have the right loop code. But it is hard because I am working with someone else's code.

Maybe someone can help me by looking at the following code:

' populate array with days of month

   on Error resume next

     

    

   do until rs.EOF

        rs.MoveFirst

   if intCount > 31 then exit do

   if Day(rs("EventDate")) = intCount + 1 then

             dictDte(intCount, 1) = rs("EventDesc")

             rs.Movenext

      Else

             dictDte(intCount, 1) = " "

      End If

      dictDte(intCount, 2) = intCount + 1

      intCount = intCount + 1

   loop

Can someone please help me with this?  




Replies:
Posted By: MorningZ
Date Posted: 17 November 2003 at 1:19pm

well, right off the bat..... you have an inifinite loop there which you can't see because of the "On Error Resume Next" statement

everytime it loops, it starts over (the "movefirst" line)



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Misty
Date Posted: 17 November 2003 at 1:24pm

It is not working the way I want it to. I am working with someone else's code. I really need to get help with getting it to display more than one event for a date if that is the case.  This works, but it will only show one event for each date. I'm just not sure how to get it work. I've tried several different things.  

I guess this means I should remove rs.MoveFirst. But how do I get it to work correctly?  This is weird, but the calendar keeps on showing the last event in the database instead of the first event. I have two events for a particular date. I want both of them to show up.



Posted By: MorningZ
Date Posted: 17 November 2003 at 2:43pm

you don't give even close to enough information for someone to be able to help you...



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Misty
Date Posted: 17 November 2003 at 3:57pm

I prefer to not give a link to the web page because it is password protected.

The code is long, but I will post most of the code. Hopefully, it will help. You can see my SQL String in red. The loop statement is bolded. I need some help with fixing the loop statement so I can get more than one event to show up for a particular date.

Note: I got this calendar application from http://www.asp-dev.com - http://www.asp-dev.com . I decided to modify it so people could see details for each event. This is not a feature on that calendar application.

%@ LANGUAGE="VBScript" %>

 

<%

Session.LCID = 2057

 

 '-----------------------------------------------------------

      ' START OF CODE TO PUT AT THE TOP OF A PAGE NEEDING

      ' PASSWORD PROTECTING

 

'I got this application from http://www.asp-dev.com/ - http://www.asp-dev.com

 

      dim variables

          

      

      'Set connection details

  

   

    Function FormatStr(String)

      on Error resume next

      String = Replace(String, CHR(13), "")

      String = Replace(String, CHR(10) & CHR(10), "</P><P>")

      String = Replace(String, CHR(10), "<BR>")

      FormatStr = String

End Function

 

Dim dtToday, nIndex

dtToday = Date()

 

Dim dtCurViewMonth ' First day of the currently viewed month

Dim dtCurViewDay ' Current day of the currently viewed month

Dim frmDate ' Date submitted by form

 

' if the GO button was used, build the date from the month and year

 

If InStr(1, Request.Form, "subGO", 1) > 0  then

      if Request.Form("CURDATE_month") = "" then

             tmpMonth = month(now())

      else

             tmpMonth = Request.Form("CURDATE_month")

      End If




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net