Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Recurrence Exception is not working as I expect
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Recurrence Exception is not working as I expect

 Post Reply Post Reply
Author
Message
karthiksp View Drop Down
Groupie
Groupie


Joined: 09 May 2007
Location: United States
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote karthiksp Quote  Post ReplyReply Direct Link To This Post Topic: Recurrence Exception is not working as I expect
    Posted: 07 May 2008 at 9:10am
Hi All,
 
        Here is my scenario, We are using Sybase as our Backend Database and Powebuilder as our front-end. I have the Recurrence Event for the following pattern.
 
Daily Event (Week Day Only) from 5/1/2008 - 5/30/2008 from 8.00 AM - 9.00 AM
 
3 Exceptions for the above recurrence. For the Dates (13th, 21st and 29th) events are deleted. I captured all the 3 deletion as exception. Following is the script I used to populate the recurrence event with that 3 exceptions.
 
lole_master_event  =  lole_DataProvider.Createevent()
........ All Data processing for lole_master_event
 
lole_calendar_recurrence     = lole_master_event.CreateRecurrence()
lole_calendar_recurrence_options = lole_calendar_recurrence.Options
 
For ll_exception_index = 1 to exceptionscount
     'Copy the Event as same as Master Event
     lole_exception_deletion     =  lole_master_event.CloneEvent()
 
     'Remove the recurrence pattern from the exception event
     lole_exception_deletion.RemoveRecurrence()
 
     'Set the StartTime and EndTIme to remove the event
     lole_exception_deletion.StartTime  =  idt_RExceptionStartTimeOrig
     lole_exception_deletion.EndTime  =   idt_RExceptionEndTimeOrig
 
     lole_exception_deletion.RExceptionDeleted = true
     lole_exception_deletion.MakeAsRException()
     lole_calendar_recurrence.SetException(lole_exception_deletion)
     lole_DataProvider.ChangeEvent(lole_exception_deletion)
Next
 
lole_DataProvider.AddEvent(lole_calendar_event)
lole_calendar_event.UpdateRecurrence(lole_calendar_recurrence)

For the above code, what it happens is recurrence master event created successfully and when it goes to the loop of exception, it removes the first exception from the calendar control (i.e May 13th) and the rest 2 exceptions stays there in the calendar control.
 
When I Debug, it is looping 3 times and it removes the exception for the very first iteration.
 
Please help me in finding out what am I doing wrong in setting the exception
 
Thanks
Karthik
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.