<?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 : CalendarResources Example...</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : CalendarResources Example...]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 28 May 2026 17:50:03 +0000</pubDate>
  <lastBuildDate>Mon, 05 Oct 2009 12:07:56 +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=7473</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[CalendarResources Example... : What is special in VB.NET case?...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=53639&amp;title=calendarresources-example#53639</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4721">mdoubson</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 05 October 2009 at 12:07pm<br /><br />What is special in VB.NET case? ]]>
   </description>
   <pubDate>Mon, 05 Oct 2009 12:07:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=53639&amp;title=calendarresources-example#53639</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : anything for this in vb .net? ...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=53617&amp;title=calendarresources-example#53617</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5548">visualise01</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 02 October 2009 at 5:08pm<br /><br />anything for this in vb .net?]]>
   </description>
   <pubDate>Fri, 02 Oct 2009 17:08:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=53617&amp;title=calendarresources-example#53617</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : You can manage your own list from...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24716&amp;title=calendarresources-example#24716</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1200">Stilki</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 27 July 2007 at 8:02pm<br /><br />You can manage your own list from another table if you like;<DIV>Foe example...</DIV><DIV>'get a list of the users<BR>Set&nbsp;recordset =&nbsp;database.openrecordset("MyTable")<BR></DIV><DIV>while not recordset.eof&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'previous code</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; ......... Create new calendar resource object</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; .........assign dataprovider</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; .........Open dataprovider</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; 'add the users from the table<BR>&nbsp;&nbsp;&nbsp;&nbsp; pRes(i).Name = recordset!FirstName<BR>&nbsp;&nbsp;&nbsp;&nbsp; pRes(i).ScheduleIDs.Add recordset!UserId<BR>&nbsp;&nbsp;&nbsp;&nbsp; recordset.movenext</DIV><DIV>wend</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>OR</DIV><DIV>&nbsp;</DIV><DIV>It is better to use the schedules object for the Calendar control.</DIV><DIV>The schedules table is small so I would duplicate your users table and programmatically maintain both tables. If you add a new user also add it to the schedules table, if you modify or delete from the users table do it to the schedules table as well. This way you are letting the Calendar control behave as it was intended (designed) to by allowing the calendar control to use the tables it is expecting. Note: I prefer this method because if the design of the Calendar control changes in how/what it is reading from you can adapt it to easier. </DIV><DIV>You may also want to check out how&nbsp;to use the Calendar control with&nbsp; a custom data provider, this way you control the reading and writing to the database as well as being able to extend or modify each property of an event of the events table; for example I have added couple of extra fields in the events table that the calendar control reads from and writes to.</DIV>]]>
   </description>
   <pubDate>Fri, 27 Jul 2007 20:02:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24716&amp;title=calendarresources-example#24716</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : I am adapting this to an existing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24715&amp;title=calendarresources-example#24715</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=331">vbuser</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 27 July 2007 at 7:28pm<br /><br /><P>I am adapting this to an existing application that ALREADY has a list of Names I need to use INSTEAD of the built in object.</P><DIV>'get a list of the schedules<BR>Set objSchedule = CalendarControl.DataProvider.Schedules(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR> 'add the schedule to the resource<BR>pRes(i).Name = objSchedule.Name<BR>pRes(i).ScheduleIDs.Add objSchedule.Id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV><DIV>What is the best&nbsp;way to import this list &amp; IDS form another table other than Schedules table?</DIV>]]>
   </description>
   <pubDate>Fri, 27 Jul 2007 19:28:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24715&amp;title=calendarresources-example#24715</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : GREAT JOB !!! Thank you for the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24714&amp;title=calendarresources-example#24714</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=331">vbuser</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 27 July 2007 at 2:55pm<br /><br /><P>GREAT JOB !!!</P><P>Thank you for the quick responce!!!</P>]]>
   </description>
   <pubDate>Fri, 27 Jul 2007 14:55:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24714&amp;title=calendarresources-example#24714</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : Hello vbUser,  Below is a snippet...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24707&amp;title=calendarresources-example#24707</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1200">Stilki</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 27 July 2007 at 12:06pm<br /><br />Hello vbUser,<DIV>&nbsp;</DIV><DIV>Below is a snippet on how to display multischedules from one database.</DIV><DIV>I have also attached the modified sample calendar control project. This project uses v11.1.3.</DIV><DIV>&nbsp;</DIV><DIV>Goto the procedure 'mnuMultiSchedulesExtended_Click' and you will see the code below in action.</DIV><DIV>&nbsp;</DIV><DIV>In the access database, there is a table called Schedules, this is linked to the scheduleID field in the events database. The sample below is using each schedule as a user and each user as a resource.</DIV><DIV>&nbsp;</DIV><DIV>If you load the sample attached, start the project;</DIV><DIV>&nbsp;</DIV><DIV>Select the menu option, <strong>FILE|LOAD MULTISCHEDULES (EXTENDED)</strong></DIV><DIV>change your view to <strong>5 day view</strong></DIV><DIV>Select the <strong>dates 2nd and 3rd July 2007</strong> to see some <strong>calendar entries</strong> for User 1 and User 2 (these are the names of the schedules in the schedules table).</DIV><DIV>&nbsp;</DIV><DIV><a href="https://forum.codejock.com/uploads/20070727_120522_CalendarSampleM.zip" target="_blank">uploads/20070727_120522_CalendarSampleM.zip</A></DIV><DIV>&nbsp;</DIV><DIV>Have fun and hope this helps you <img src="https://forum.codejock.com/smileys/smiley4.gif" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Private Sub mnuMultiSchedulesExtended_Click()</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; Dim arResources As New CalendarResources<BR>&nbsp;&nbsp; Dim pRes() As CalendarResource<BR>&nbsp;&nbsp; Dim objSchedule As CalendarSchedule<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; Dim strConnectionString As String<BR>&nbsp;&nbsp; Dim i As Long<BR>&nbsp;&nbsp; Dim j As Long</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </DIV><DIV>&nbsp;&nbsp; strConnectionString = _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Provider=Microsoft.Jet.OLEDB.4.0;" &amp; _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Data Source=" &amp; App.Path &amp; "\Events1.mdb" &amp; ";" &amp; _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Jet OLEDB:Encrypt Database=True;"</DIV><DIV><BR>&nbsp;&nbsp; CalendarControl.SetDataProvider strConnectionString<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; If Not CalendarControl.DataProvider.Open Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CalendarControl.DataProvider.Create<BR>&nbsp;&nbsp; End If</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; j = CalendarControl.DataProvider.Schedules.Count - 1<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; For i = 0 To j<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReDim Preserve pRes(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set pRes(i) = New CalendarResource<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If i = 0 Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Use the first connection string for the first datasource<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pRes(i).SetDataProvider2 strConnectionString, True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'add the first resources datasource object to any subsequent schedule in the database<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pRes(i).SetDataProvider pRes(0).DataProvider, False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Open the datasource<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If pRes(i).DataProvider.Open Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'get a list of the schedules<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set objSchedule = CalendarControl.DataProvider.Schedules(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'add the schedule to the resource<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pRes(i).Name = objSchedule.Name<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pRes(i).ScheduleIDs.Add objSchedule.Id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'add resource to resource array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; arResources.Add pRes(i)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp; Next i<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; 'add resource array to calendarcontrol<BR>&nbsp;&nbsp; CalendarControl.SetMultipleResources arResources<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; CalendarControl.Populate<BR>&nbsp;&nbsp; CalendarControl.RedrawControl<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; Set arResources = Nothing<BR>&nbsp;&nbsp; Set objSchedule = Nothing<BR>&nbsp;&nbsp; If IsArray(pRes) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Erase pRes<BR>&nbsp;&nbsp; End If<BR></DIV><DIV>End Sub</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 27 Jul 2007 12:06:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24707&amp;title=calendarresources-example#24707</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : How can this code be modified...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24699&amp;title=calendarresources-example#24699</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=331">vbuser</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 26 July 2007 at 7:04pm<br /><br />How can this code be modified to allow for MULTIPLE NAME RESOURCES, basically the <DIV>FILE|LOAD MULTISCHEDULES (EXTENDED), but using an ACCESS Database... I cannot get it to work... What am I missing? Thank you.</DIV>]]>
   </description>
   <pubDate>Thu, 26 Jul 2007 19:04:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24699&amp;title=calendarresources-example#24699</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : --WBR,Serge ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24197&amp;title=calendarresources-example#24197</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 04 July 2007 at 4:26pm<br /><br /><img src="uploads/20070704_162644_CalendarResourc.PNG" height="510" width="505" border="0"><br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Wed, 04 Jul 2007 16:26:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24197&amp;title=calendarresources-example#24197</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : Hi Stilki,   Thanks for the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24110&amp;title=calendarresources-example#24110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2989">karthiksp</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 02 July 2007 at 8:35am<br /><br />Hi Stilki,<DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; Thanks for the example that you posted. It was really helpful in understanding the concept for 2 data sources.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My Quick question is I would like to know the Object model for CalendarResourcesManager Object in order to access its properties and methods.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Could you please help me in that.</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV><DIV>Karthik</DIV>]]>
   </description>
   <pubDate>Mon, 02 Jul 2007 08:35:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24110&amp;title=calendarresources-example#24110</guid>
  </item> 
  <item>
   <title><![CDATA[CalendarResources Example... : Here is a sample of how you can...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24068&amp;title=calendarresources-example#24068</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1200">Stilki</a><br /><strong>Subject:</strong> 7473<br /><strong>Posted:</strong> 01 July 2007 at 1:18am<br /><br />Here is a sample of how you can display entries from 2 data sources (2 access databases). The principals will be the same if one is and XML data source and an OUTLOOK datasource.<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20070701_011753_CalendarMultiSc.JPG" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>I have attached the modified Calendar sample so you can see it working.</DIV><DIV>I am using v11.1.3</DIV><DIV><a href="https://forum.codejock.com/uploads/20070701_011110_CalendarSample.zip" target="_blank">uploads/20070701_011110_CalendarSample.zip</A></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>If you run the project, goto menu option </DIV><DIV>&nbsp;</DIV><DIV>FILE|LOAD MULTISCHEDULES (SIMPLE)</DIV><DIV>choose 5 day week view and look at events for 2nd and 3rd&nbsp;July 2007</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>'--------------------------------------------------------------------------------------------</DIV></DIV><DIV>Private Sub mnuMultiSchedulesSimple_Click()</DIV><DIV>&nbsp;&nbsp;&nbsp; Dim arResources As New CalendarResources<BR>&nbsp;&nbsp;&nbsp; Dim pRes0 As New CalendarResource<BR>&nbsp;&nbsp;&nbsp; Dim pRes1 As New CalendarResource</DIV><DIV>&nbsp;&nbsp;&nbsp; Dim pSchedules As CalendarSchedules<BR>&nbsp;&nbsp;&nbsp; Dim bResult As Boolean</DIV><DIV>&nbsp;&nbsp;&nbsp; '// ** data provider<BR>&nbsp;&nbsp;&nbsp; Dim strConnectionString As String<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; '// FIRST DATA SOURCE (Events1.mdb)<BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; strConnectionString = _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Provider=Microsoft.Jet.OLEDB.4.0;" &amp; _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Data Source=" &amp; App.Path &amp; "\Events1.mdb" &amp; ";" &amp; _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Jet OLEDB:Encrypt Database=True;"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; bResult = g_DataResourcesMan.AddDataProvider( _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strConnectionString, xtpCalendarDPF_CreateIfNotExists + _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtpCalendarDPF_SaveOnDestroy + xtpCalendarDPF_CloseOnDestroy)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; pRes0.SetDataProvider g_DataResourcesMan.DataProvider(0), True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If pRes0.DataProvider Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Assert False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Not pRes0.DataProvider.Open Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not pRes0.DataProvider.Create Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Assert False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; '// SECOND DATA SOURCE (Events2.mdb)<BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; strConnectionString = _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Provider=Microsoft.Jet.OLEDB.4.0;" &amp; _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Data Source=" &amp; App.Path &amp; "\Events2.mdb" &amp; ";" &amp; _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Jet OLEDB:Encrypt Database=True;"<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; bResult = g_DataResourcesMan.AddDataProvider( _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; strConnectionString, xtpCalendarDPF_CreateIfNotExists + _<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xtpCalendarDPF_SaveOnDestroy + xtpCalendarDPF_CloseOnDestroy)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; pRes1.SetDataProvider g_DataResourcesMan.DataProvider(1), True<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If pRes1.DataProvider Is Nothing Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Assert False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Not pRes1.DataProvider.Open Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Not pRes1.DataProvider.Create Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Assert False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; '// ** schedules<BR>&nbsp;&nbsp; '// ** resources<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; '// FIRST DATA SOURCE<BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; Set pSchedules = pRes0.DataProvider.Schedules<BR>&nbsp;&nbsp;&nbsp; pRes0.Name = pSchedules.Item(0).Name<BR>&nbsp;&nbsp;&nbsp; pRes0.ScheduleIDs.Add pSchedules.Item(0).Id<BR>&nbsp;&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; '// SECOND DATA SOURCE<BR>&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; Set pSchedules = pRes1.DataProvider.Schedules<BR>&nbsp;&nbsp;&nbsp; pRes1.Name = pSchedules.Item(0).Name<BR>&nbsp;&nbsp;&nbsp; pRes1.ScheduleIDs.Add pSchedules.Item(0).Id<BR>&nbsp;&nbsp;&nbsp; '------------------------------------------------------------------------------------<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; '------------------------------------------------------------------<BR>&nbsp;&nbsp; 'When you are adding an event<BR>&nbsp;&nbsp; 'You need to use<BR>&nbsp;&nbsp; '&nbsp;&nbsp; g_DataResourcesMan.DataProvider(0 or 1).AddEvent<BR>&nbsp;&nbsp; 'instead of<BR>&nbsp;&nbsp; 'frmMain.CalendarControl.DataProvider.AddEvent m_pEditingEvent<BR>&nbsp;&nbsp; '------------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; arResources.Add pRes0<BR>&nbsp;&nbsp;&nbsp; arResources.Add pRes1<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; g_DataResourcesMan.ApplyToCalendar CalendarControl<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CalendarControl.SetMultipleResources arResources<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; CalendarControl.Populate<BR>&nbsp;&nbsp;&nbsp; CalendarControl.RedrawControl<BR></DIV><DIV>End Sub</DIV><DIV>'--------------------------------------------------------------------------------------------</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 01 Jul 2007 01:18:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7473&amp;PID=24068&amp;title=calendarresources-example#24068</guid>
  </item> 
 </channel>
</rss>