<?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 : Recurrence events with MySQL</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Recurrence events with MySQL]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 09:29:52 +0000</pubDate>
  <lastBuildDate>Tue, 10 Oct 2006 17:54:33 +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=5221</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[Recurrence events with MySQL : DoReadRPattern is called after...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16440&amp;title=recurrence-events-with-mysql#16440</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 10 October 2006 at 5:54pm<br /><br />DoReadRPattern is called after you exit DoRetrieveDayEvents.<br>&nbsp;<br>Try to debug DoRetrieveDayEvents and CreateEventFromRS and check that it works as expected. Specially see reading data code.<br><br>Before my example started working I had to debug line by line and fix something with data reading like different types in DB Field and event properties or invalid property name. <br><br>CalendarDataProvider.RetrieveDayEvents logic is following (in pseudo code):<br>&nbsp;<br><table width="99%"><tr><td><pre class="BBcode"><br>class CalendarDataProvider<br>&nbsp;<br>Public Function RetrieveDayEvents(dtDay) As CalendarEvents<br>&nbsp;&nbsp;&nbsp; if Not IsOpen() then&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Nothing<br>&nbsp;&nbsp;&nbsp; end if<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim ptrResult as CalendarEvents <br>&nbsp;<br>&nbsp;&nbsp;&nbsp; if m_cache.Enabled And m_cache.IsDayInCache(dtDay) then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ptrResult = m_cache.RetrieveDayEvents(dtDay)<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ptrResult = DoRetrieveDayEvents(dtDay)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ptrResult is Nothing then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Nothing<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for Each pEvent in ptrResult<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; patternID = pEvent.CustomProperties("process_RecurrencePatternID")<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if pEvent.CustomProperties("process_RecurrenceState") = xtpCalendarRecurrenceMaster and<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; patternID &lt;&gt; Empty then <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPattern = DoRead_RPattern(patternID)<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if pPattern is Nothing then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Nothing<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent-&gt;MakeEventAsRecurrence()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent-&gt;SetRecurrencePatternID(RPatternID)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent-&gt;UpdateRecurrence(pPattern)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if m_cache.Enabled then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_cache.AddToCache(ptrResult, dtDay);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end if<br>&nbsp;&nbsp;&nbsp; end if<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; return ptrResult<br>End Function<br></pre></td></tr></table> <br><br>--<br>WBR,<br>Serge <br>]]>
   </description>
   <pubDate>Tue, 10 Oct 2006 17:54:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16440&amp;title=recurrence-events-with-mysql#16440</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : I&amp;#039;m using the second variant,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16436&amp;title=recurrence-events-with-mysql#16436</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2391">luisluis</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 10 October 2006 at 3:15pm<br /><br />I'm using the second variant, but I canīt get DoReadRPattern fired.<br><br>He is what I'm doing:<br><br>Private Sub CalendarControl_DoRetrieveDayEvents(ByVal sender As Object, ByVal e As AxXtremeCalendarControl._DCalendarControlEvents_DoRetrieveDayEventsEvent) Handles m_pCalendar.DoRetrieveDayEvents<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; abrir_DB()<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim strSQL As String<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = m_pHelper.MakeRetrieveDayEventsSQL(e.dtDay)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myCommand.Connection = miconexion<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myCommand.CommandText = strSQL<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyDataReader = myCommand.ExecuteReader<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim pEvent As CalendarEvent<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; While MyDataReader.Read()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent = m_pHelper.CreateEventFromRS(MyDataReader, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not pEvent Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b> e.events.Add(pEvent)</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End While<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch myerror As OdbcException<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(myerror.Message, "Error conectando a la base de datos", MessageBoxButtons.OK, MessageBoxIcon.Error)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dispose_DB()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch myerror As Exception<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(myerror.Message, "Error al leer evento", MessageBoxButtons.OK, MessageBoxIcon.Error)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Finally<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If estado_DB &lt;&gt; ConnectionState.Closed Then cerrar_DB()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Try<br><br>End Sub<br><br><br>Public Function CreateEventFromRS(ByVal pEventRS As OdbcDataReader, ByVal bRException As Boolean) As CalendarEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateEventFromRS = Nothing<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim pEvent As CalendarEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim nEventID As Long<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nEventID = pEventRS.GetValue(pEventRS.GetOrdinal("EventID")) 'pEventRS("EventID")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent = m_pCalendar.DataProvider.CreateEventEx(nEventID)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If pEvent Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Function<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.Subject = pEventRS("Subject")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.Location = pEventRS("Location")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.Body = pEventRS("Body")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.MeetingFlag = IIf(pEventRS("IsMeeting") &lt;&gt; 0, True, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.PrivateFlag = IIf(pEventRS("IsPrivate") &lt;&gt; 0, True, False)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.Label = pEventRS("LabelID")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.BusyStatus = pEventRS("BusyStatus")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.Importance = pEventRS("ImportanceLevel")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.StartTime = pEventRS("StartDateTime")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.EndTime = pEventRS("EndDateTime")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.AllDayEvent = IIf(pEventRS("IsAllDayEvent") &lt;&gt; 0, True, False)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.Reminder = IIf(pEventRS("IsReminder") &lt;&gt; 0, True, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.ReminderMinutesBeforeStart = pEventRS("ReminderMinutesBeforeStart")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.ReminderSoundFile = pEventRS("RemainderSoundFile")<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.CustomProperties.LoadFromString(pEventRS("CustomPropertiesXMLData"))<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If bRException Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.MakeAsRException()<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.RExceptionStartTimeOrig = pEventRS("RExceptionStartTimeOrig")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.RExceptionEndTimeOrig = pEventRS("RExceptionEndTimeOrig")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.RExceptionDeleted = IIf(pEventRS("ISRecurrenceExceptionDeleted") &lt;&gt; 0, True, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not bRException Then<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' "process_RecurrenceState" and "process_RecurrencePatternID" properties<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' are used to process master events.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' If they are set and RecurrenceStaie is Master Data provider will<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' fier DoReadRPattern event and make event as Master.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' And it will also generate ocurrences for RetrieveDayEvents method.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Thise properties are temporary and they will be removed by data provider.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' If these properties are not set data provider expect that master event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' is already compleated - CreateRecurrence method is called and<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Recurrence pattern is set.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' This mechanism is usefull for DB data providers, when events and patterns<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' are stored separately (in tables).<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' But if events stored in some memory collection or array<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' it should not be used because master event store recurrence pattern inside.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b> pEvent.CustomProperties("process_RecurrenceState") = pEventRS("RecurrenceState") <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent.CustomProperties("process_RecurrencePatternID") = pEventRS("RecurrencePatternID") </b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateEventFromRS = pEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Function<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch myerror As Exception<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(myerror.Message, "Error al crear evento desde la base de datos", MessageBoxButtons.OK, MessageBoxIcon.Error)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CreateEventFromRS = Nothing<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Try<br><br>&nbsp;&nbsp;&nbsp; End Function<br><br>When I reach the end of DoRetrieveDayEvents, DoReadRPattern is not called. Why??? ]]>
   </description>
   <pubDate>Tue, 10 Oct 2006 15:15:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16436&amp;title=recurrence-events-with-mysql#16436</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : As it is described in a previous...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16433&amp;title=recurrence-events-with-mysql#16433</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 10 October 2006 at 7:47am<br /><br />As it is described in a previous message, recurrence pattern has its own exceptions collection.<br>|- &lt;Recurrence Pattern&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; |-&nbsp; &lt;Recurrence exceptions collection&gt;<br>&nbsp;<br>When you create a new recurrence event it consists of a master event and a recurrence pattern.<br>Master event is defined by corresponding RecurrenceState property value.<br>Also start/end time properties define whole series period - from the first occurrence to the last one. (They are updated automatically by data provider and you shouldn't change them, only save/load)<br>Ocurrences are generated at run-time by the data provider and do have some temporary event ID.<br>&nbsp;<br>When user changes such generated event it is stored in a recurrence pattern exceptions collection and called a recurrence exception.&nbsp; It is also defined by corresponding RecurrenceState property value and stored in events table.<br>&nbsp;<br>Ther are 2 ways of loading pattern for master event:<br>&nbsp;&nbsp;&nbsp; 1 - read master event, read recurrence pattern, read recurrence exceptions for this pattern. This let you completely configure master event.<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; 2 - read master event, set 2 custom properties (see example) with pattern ID and recurrence state 'master' and return such incomplete master event. Then data provider find those custom properties in master event, it will fire DoReadRPattern and update event itself.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>The second variant is a bit easier to understand (and it avoids some redundant code).<br>&nbsp;<br>DoReadRPattern notification have to read recurrence pattern and exceptions collection.<br>ReadRPatternExceptions is called from reading pattern chain.<br><br>--<br>WBR,<br>Serge <br>]]>
   </description>
   <pubDate>Tue, 10 Oct 2006 07:47:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16433&amp;title=recurrence-events-with-mysql#16433</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : In the Visual Basic 6 example...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16415&amp;title=recurrence-events-with-mysql#16415</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2391">luisluis</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 09 October 2006 at 11:58am<br /><br />In the Visual Basic 6 example there is this sub:<br><br>Public Sub ReadRPatternExceptions(pPattern As CalendarRecurrencePattern, pConnection As ADODB.Connection)<br><br>&nbsp;&nbsp;&nbsp; Dim nPatternID As Long<br>&nbsp;&nbsp;&nbsp; Dim strSQL As String<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; nPatternID = pPattern.Id<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; strSQL = "SELECT * FROM CalendarEvents WHERE " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; strSQL = strSQL + " RecurrenceState = " &amp; xtpCalendarRecurrenceException &amp; " AND " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp; strSQL = strSQL + " RecurrencePatternID = " &amp; nPatternID<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim rsEvents As ADODB.Recordset<br>&nbsp;&nbsp;&nbsp; Set rsEvents = pConnection.Execute(strSQL)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim pEvent As CalendarEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; While Not rsEvents.EOF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set pEvent = CreateEventFromRS(rsEvents, True)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not pEvent Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPattern.SetException pEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rsEvents.MoveNext<br>&nbsp;&nbsp;&nbsp; Wend<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>End Sub <br><br><br><br>Which is the handler I have to implement for this sub?<br>]]>
   </description>
   <pubDate>Mon, 09 Oct 2006 11:58:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16415&amp;title=recurrence-events-with-mysql#16415</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : Hi,Well, I suspect that the recurrence...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16389&amp;title=recurrence-events-with-mysql#16389</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 07 October 2006 at 5:49am<br /><br />Hi,<br><br>Well, I suspect that the recurrence data is not stored/readed correctly.<br>Calendar itself does not analyze recurrence pattern properties for having incorrect values, and if there are some "crazy" values it might work like this (validation of input values is performed by user interface method - when Ok button at form is pressed, and so on).<br><br>I would suggest you to debug your DoCreateRPattern, DoUpdateRPattern, DoReadRPattern handlers (did you implemented them?) and check that all pattern data is correctly stored in DB.<br><br>Validate that recurrence pattern properties, specifically Options, have a correct meaning. <br><br>Also you can add some error checking handlers.<br><br>Note that recurrence event has a complex structure. Briefly:<br>&nbsp; &lt;Master Event&gt;<br>&nbsp; |- &lt;Recurrence Pattern&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; |-&nbsp; &lt;Recurrence exceptions collection&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;<br>For more information on recurrence events you can search this forum for 'recurrence' keyword.<br><br>--<br>WBR,<br>Serge]]>
   </description>
   <pubDate>Sat, 07 Oct 2006 05:49:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16389&amp;title=recurrence-events-with-mysql#16389</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL :    sserge wrote:Hi,Does non-recurrence...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16379&amp;title=recurrence-events-with-mysql#16379</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2391">luisluis</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 06 October 2006 at 11:25am<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by sserge" alt="Originally posted by sserge" style="vertical-align: text-bottom;" /> <strong>sserge wrote:</strong><br /><br />Hi,<br>Does non-recurrence events works fine for you?<br></td></tr></table><br><br>Yes, it works perfectly in non-recurrence events.<br><br>I will try to be more specific. To make my example I use as template the Visual Basic 6 example that comes with Codejock Xtreme SuitePro ActiveX 2006.<br><br>----------------------<br><br>I have defined a class "clsproviderMySQL"<br><br>Public Sub abrir_DB()<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; conn_string = "DSN=ejemplo;" &amp; _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Uid=root;" &amp; _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Pwd=112233;"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; miconexion = New OdbcConnection(conn_string)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; miconexion.Open()<br>&nbsp;&nbsp;&nbsp; End Sub<br><br>Public Sub SetCalendar(ByVal pCalendar As AxXtremeCalendarControl.AxCalendarControl)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_pCalendar = pCalendar<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_pHelper.SetCalendar(pCalendar)<br>&nbsp;&nbsp;&nbsp; End Sub<br><br>m_pHelper is another class.<br><br><br>-----------------------------<br><br>When the main form is loaded:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Public Connectionstring As String = "Provider=Custom;DSN=ejemplo"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Private mysql As New clsproviderMySQL<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; mysql.abrir_DB()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mysql.SetCalendar(calendarcontrol)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calendarcontrol.SetDataProvider(Connectionstring) <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calendarcontrol.DataProvider.CacheMode = CalendarDataProviderCacheMode.xtpCalendarDPCacheModeOnRepeat<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'If the Data Source can not be opened, then create a new data source<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not calendarcontrol.DataProvider.Open Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Create a new data source to use.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calendarcontrol.DataProvider.Create()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'm_eActiveDataProvider = eDataProviderType<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calendarcontrol.DayView.ScrollToWorkDayBegin()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; calendarcontrol.Populate()&nbsp; &lt;------- ERROR<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>-----------------------<br><br>Tell me if I was clear enough.<br>]]>
   </description>
   <pubDate>Fri, 06 Oct 2006 11:25:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16379&amp;title=recurrence-events-with-mysql#16379</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : Hi,Could you provide some additional...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16372&amp;title=recurrence-events-with-mysql#16372</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 06 October 2006 at 9:17am<br /><br />Hi,<br><br>Could you provide some additional information about problem.<br>Only with code it's hard to tell somthing.<br>&nbsp;<br>Does non-recurrence events works fine for you?<br>&nbsp;<br>Try to comment some parts of code to find which of them give an error.<br>&nbsp;<br>For a test try to write a code for DoRetrieveDayEvents which will not use DB, just create and return a single event for each day with start time as "now".<br>&nbsp;<br>Let's go step by step to localize a problem.<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Fri, 06 Oct 2006 09:17:10 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16372&amp;title=recurrence-events-with-mysql#16372</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : Does someone have an example in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16353&amp;title=recurrence-events-with-mysql#16353</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2391">luisluis</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 05 October 2006 at 6:49pm<br /><br />Does someone have an example in Visual Basic .NET of DoRetrieveDayEvents function?<br><br>I have done this<br><br>Private Sub CalendarControl_DoRetrieveDayEvents(ByVal sender As Object, ByVal e As AxXtremeCalendarControl._DCalendarControlEvents_DoRetrieveDayEventsEvent) Handles m_pCalendar.DoRetrieveDayEvents<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Try<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; abrir_DB()<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim strSQL As String<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = m_pHelper.MakeRetrieveDayEventsSQL(e.dtDay)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myCommand.Connection = miconexion<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myCommand.CommandText = strSQL<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyDataReader = myCommand.ExecuteReader<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim pEvent As CalendarEvent<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; While MyDataReader.Read()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pEvent = m_pHelper.CreateEventFromRS(MyDataReader, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not pEvent Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.events.Add(pEvent)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End While<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch myerror As OdbcException<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(myerror.Message, "Error conectando a la base de datos", MessageBoxButtons.OK, MessageBoxIcon.Error)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dispose_DB()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Catch myerror As Exception<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox.Show(myerror.Message, "Error al leer evento", MessageBoxButtons.OK, MessageBoxIcon.Error)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Finally<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If estado_DB &lt;&gt; ConnectionState.Closed Then cerrar_DB()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Try<br><br>&nbsp;&nbsp;&nbsp; End Sub<br>&nbsp;<br><br>Public Function MakeRetrieveDayEventsSQL(ByVal dtDay As Date) As String<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim nYear As Long, nMonth As Long, nDay As Long<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim strSQL As String<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nYear = Year(dtDay)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nMonth = Month(dtDay)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nDay = DatePart("d", dtDay)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = "SELECT * FROM CalendarEvents WHERE " &amp; vbCrLf<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + " ( RecurrenceState = " &amp; CalendarEventRecurrenceState.xtpCalendarRecurrenceNotRecurring &amp; " OR " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp; RecurrenceState = " &amp; CalendarEventRecurrenceState.xtpCalendarRecurrenceMaster &amp; ") AND " &amp; vbCrLf<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "( YEAR(StartDateTime) &lt; " &amp; nYear &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp; OR ( YEAR(StartDateTime) = " &amp; nYear &amp; " AND " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONTH(StartDateTime) &lt; " &amp; nMonth &amp; " OR "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONTH(StartDateTime) = " &amp; nMonth &amp; " AND " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DAY(StartDateTime) &lt;= " &amp; nDay &amp; vbCrLf<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp; ) ) AND " &amp; vbCrLf<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "( YEAR(EndDateTime) &gt; " &amp; nYear &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp; OR ( YEAR(EndDateTime) = " &amp; nYear &amp; " AND " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONTH(EndDateTime) &gt; " &amp; nMonth &amp; " OR "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MONTH(EndDateTime) = " &amp; nMonth &amp; " AND " &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DAY(EndDateTime) &gt;= " &amp; nDay &amp; vbCrLf<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strSQL = strSQL + "&nbsp;&nbsp;&nbsp;&nbsp; ) ) " &amp; vbCrLf<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Debug.Print strSQL<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MakeRetrieveDayEventsSQL = strSQL<br>&nbsp;&nbsp;&nbsp; End Function <br>]]>
   </description>
   <pubDate>Thu, 05 Oct 2006 18:49:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16353&amp;title=recurrence-events-with-mysql#16353</guid>
  </item> 
  <item>
   <title><![CDATA[Recurrence events with MySQL : I&amp;#039;m using custom provider...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16327&amp;title=recurrence-events-with-mysql#16327</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2391">luisluis</a><br /><strong>Subject:</strong> 5221<br /><strong>Posted:</strong> 04 October 2006 at 5:55pm<br /><br />I'm using custom provider with a MySQL database and Visual Basic .NET. I have done the function which create and save in DB a recurrence event. But when I try to retrive the recurrence events I get this error in calendarcontrol.populate():<br><br>"FatalExecutionEngineError was detected<br>Message: The runtime has encountered a fatal error. The address of the error was at 0x79f1c189, on thread 0xf94. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack."<br><br>Some ideas?<br><br>]]>
   </description>
   <pubDate>Wed, 04 Oct 2006 17:55:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5221&amp;PID=16327&amp;title=recurrence-events-with-mysql#16327</guid>
  </item> 
 </channel>
</rss>