Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Needs Help with Calendar Application
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Needs Help with Calendar Application

 Post Reply Post Reply
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: Needs Help with Calendar Application
    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?  



Edited by Misty
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post 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.



Edited by Misty
Back to Top
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post 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. 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

 

      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

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.