<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Binding data and exceptions</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Binding data and exceptions]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 02:52:14 +0000</pubDate>
  <lastBuildDate>Fri, 17 Nov 2006 07:45:32 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=5488</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Binding data and exceptions : Yes, you are on the right way.The...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5488&amp;PID=17405&amp;title=binding-data-and-exceptions#17405</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5488<br /><strong>Posted:</strong> 17 November 2006 at 7:45am<br /><br />Yes, you are on the right way.<br>&nbsp;<br>The recurrence event structure is following:<br>&nbsp;&nbsp;&nbsp; &lt;Master Event object&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Recurrence pattern object&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Recurrence exceptions collection&gt;<br>&nbsp;<br>They are linked and master event must be provided completly.<br>This is a basic idea and when you return completed master event it can be cached.<br>&nbsp;<br>I think this is easy to understand and implement.<br> <br>May be add some notifications to process recurrence exceptions, but if you have 1 - 100 exceptions for single recurrence event I think this is not a problem or using other more complex way will not give you a big advantage.<br>&nbsp;<br>Microsoft Outlook (MAPI) also use the same completed recurrence structure. The difference only that in MAPI exceptions are saved not as completed event object, but only changed properties and times of master event saved.<br>&nbsp;<br>We also may go in this way, but it's more complex and looks to be not needed for now.<br>&nbsp;<br>--<br>WBR,<br>Serge <br>]]>
   </description>
   <pubDate>Fri, 17 Nov 2006 07:45:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5488&amp;PID=17405&amp;title=binding-data-and-exceptions#17405</guid>
  </item> 
  <item>
   <title><![CDATA[Binding data and exceptions : I found a solution to this, sort...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5488&amp;PID=17385&amp;title=binding-data-and-exceptions#17385</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2321">JohnCrenshaw</a><br /><strong>Subject:</strong> 5488<br /><strong>Posted:</strong> 16 November 2006 at 4:59pm<br /><br />I found a solution to this, sort of. I can't delay the retrieval of exceptions until they are needed. I have to load them ALL when the recurrence pattern gets loaded.<DIV>&nbsp;</DIV><DIV>Is there any chance of this changing in the future?</DIV>]]>
   </description>
   <pubDate>Thu, 16 Nov 2006 16:59:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5488&amp;PID=17385&amp;title=binding-data-and-exceptions#17385</guid>
  </item> 
  <item>
   <title><![CDATA[Binding data and exceptions : I am binding my database to the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5488&amp;PID=17225&amp;title=binding-data-and-exceptions#17225</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2321">JohnCrenshaw</a><br /><strong>Subject:</strong> 5488<br /><strong>Posted:</strong> 10 November 2006 at 10:57am<br /><br />I am binding my database to the calendar and have encountered a huge problem with exceptions to recurrence patterns. For some reason, they don't take. I have implemented my own version of the DoRetrieveDayEvents() function and everything else is working.<DIV>Here is what I am doing:</DIV><DIV>&nbsp;</DIV><DIV>1. I look for recurrence patterns in my database that recur across the day and add them to the return list.</DIV><DIV>&nbsp;</DIV><DIV>2. I look for calendar blocks in the database that include this day.</DIV><DIV>&nbsp;&nbsp; 2.1 Since recurrence exceptions are implemented via the calendar blocks, they are read in at this point.</DIV><DIV>&nbsp;</DIV><DIV>3. If a calendar block represents an exception, we use the following code:</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><FONT size=1><P></FONT><FONT color=#008000 size=1>// We have a recurrence ID. This event is actually an</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// exception to a pattern that may well be recurring</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// here. Grab the pattern first</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>CXTPCalendarRecurrencePatternPtr</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1> = </FONT><FONT color=#010001 size=1>LookupPatternFromDBID</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pEv</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>m_pCal</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetRecurInstanceID</FONT><FONT size=1>(), </FONT><FONT color=#0000ff size=1>true</FONT><FONT size=1>, </FONT><FONT color=#0000ff size=1>true</FONT><FONT size=1>);</P><P></FONT><FONT color=#0000ff size=1>if</FONT><FONT size=1> (!(</FONT><FONT color=#010001 size=1>CXTPCalendarRecurrencePattern</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1>)</P><P>{</P><P></FONT><FONT color=#008000 size=1>// The pattern hadn't already been read in.</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// Read it in now.</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1> = </FONT><FONT color=#010001 size=1>CreateNewRecurrencePattern</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>XTP_CALENDAR_UNKNOWN_RECURRENCE_PATTERN_ID</FONT><FONT size=1>);</P><P></FONT><FONT color=#008000 size=1>// Grab our special data from the pointer</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>CEARecurrencePattern</FONT><FONT size=1>* </FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1> = (</FONT><FONT color=#010001 size=1>CEARecurrencePattern</FONT><FONT size=1>*)(</FONT><FONT color=#010001 size=1>CXTPCalendarRecurrencePattern</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1>;</P><P></FONT><FONT color=#008000 size=1>// stuff the info from the database into this record</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>m_pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Select</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>m_pDB</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>pEv</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>m_pCal</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetRecurInstanceID</FONT><FONT size=1>(), 0xFFFFFFFFFFFFFFFF);</P><P></FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SyncFromRecords</FONT><FONT size=1>(); </FONT><FONT color=#008000 size=1>// make the calendar aware of everything</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// since we have a pattern, we need a master event</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>CXTPCalendarEventPtr</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>pEvPtr2</FONT><FONT size=1> = </FONT><FONT color=#010001 size=1>CreateNewEvent</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>XTP_CALENDAR_UNKNOWN_EVENT_ID</FONT><FONT size=1>);</P><P></FONT><FONT color=#008000 size=1>// Grab our special data from the pointer</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>CEACalendarEvent</FONT><FONT size=1>* </FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1> = (</FONT><FONT color=#010001 size=1>CEACalendarEvent</FONT><FONT size=1>*)(</FONT><FONT color=#010001 size=1>CXTPCalendarEvent</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>pEvPtr2</FONT><FONT size=1>;</P><P></FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SetScheduleID</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>m_pEventSch</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetID</FONT><FONT size=1>());</P><P></FONT><FONT color=#008000 size=1>// read in the info for the event</P></FONT><FONT size=1><P></FONT><FONT color=#0000ff size=1>if</FONT><FONT size=1> (</FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>m_pItem</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SelectRecurrenceMaster</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>m_pDB</FONT><FONT size=1>, </FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>m_pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetID</FONT><FONT size=1>(), 0xFFFFFFFFFFFFFFFF))</P><P>{</P><P></FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SyncFromRecords</FONT><FONT size=1>(); </FONT><FONT color=#008000 size=1>// make the calendar aware of everything</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// link the recurrence pattern to the event</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SetMasterEventID</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetEventID</FONT><FONT size=1>());</P><P></FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SetRecurrenceState_Master</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1>);</P><P></FONT><FONT color=#008000 size=1>// Add the master event so it doesn't get lost</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>p</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Add</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>);</P><P>}</P><P></FONT><FONT color=#008000 size=1>// save this for later</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>RememberPatternFromDBID</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>m_pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetID</FONT><FONT size=1>(), </FONT><FONT color=#010001 size=1>CXTPCalendarRecurrencePatternPtr</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetRPatternRef</FONT><FONT size=1>(), </FONT><FONT color=#0000ff size=1>true</FONT><FONT size=1>));</P><P>}</P><P></FONT><FONT color=#008000 size=1>// make sure we have the pointer that the master event is using</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>CXTPCalendarEventPtr</FONT><FONT size=1> </FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1> = </FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetMasterEvent</FONT><FONT size=1>();</P><P></FONT><FONT color=#010001 size=1>CXTPCalendarRecurrencePattern</FONT><FONT size=1>* </FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1> = ((</FONT><FONT color=#010001 size=1>CEACalendarEvent</FONT><FONT size=1>*)(</FONT><FONT color=#010001 size=1>CXTPCalendarEvent</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>)-&gt;</FONT><FONT color=#010001 size=1>GetRPatternRef</FONT><FONT size=1>();</P><P></FONT><FONT color=#0000ff size=1>if</FONT><FONT size=1> (</FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1> != </FONT><FONT color=#010001 size=1>pRecurPtr</FONT><FONT size=1>)</P><P>{</P><P></FONT><FONT color=#008000 size=1>// somehow this pointer got changed, update it</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>RememberPatternFromDBID</FONT><FONT size=1>(((</FONT><FONT color=#010001 size=1>CEARecurrencePattern</FONT><FONT size=1>*)</FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>)-&gt;</FONT><FONT color=#010001 size=1>m_pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetID</FONT><FONT size=1>(), </FONT><FONT color=#010001 size=1>CXTPCalendarRecurrencePatternPtr</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>, </FONT><FONT color=#0000ff size=1>true</FONT><FONT size=1>));</P><P>}</P><P></FONT><FONT color=#008000 size=1>// send what we have so far to the record to prevent clobbering</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// it when we finish making this an exception</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>pEv</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SyncFromRecords</FONT><FONT size=1>(); </P><P></FONT><FONT color=#008000 size=1>// We have the pointer to the recurrence pattern now. Set the necessary</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// information to treat this instance like an exception.</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>pEv</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>MakeAsRException</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>GetPatternID</FONT><FONT size=1>());</P><P></FONT><FONT color=#010001 size=1>pRecur</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>SetException</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pEv</FONT><FONT size=1>);</P><P></FONT><FONT color=#008000 size=1>// Add the master event</P></FONT><FONT size=1><P></FONT><FONT color=#010001 size=1>p</FONT><FONT size=1>-&gt;</FONT><FONT color=#010001 size=1>Add</FONT><FONT size=1>(</FONT><FONT color=#010001 size=1>pEvMaster</FONT><FONT size=1>); </FONT><FONT color=#008000 size=1>// shouldn't have to do this. The master should already be in the array</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// but if we don't call this, our pointer for the master and the one for</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// the pattern itself get deallocated when they go out of scope. This</P></FONT><FONT size=1><P></FONT><FONT color=#008000 size=1>// seems to be a source of our problem with the exceptions not taking.</P></FONT></DIV><DIV></pre></td></tr></table></DIV>]]>
   </description>
   <pubDate>Fri, 10 Nov 2006 10:57:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5488&amp;PID=17225&amp;title=binding-data-and-exceptions#17225</guid>
  </item> 
 </channel>
</rss>