<?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 : SOLVED: Event ID</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : SOLVED: Event ID]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 29 May 2026 22:19:36 +0000</pubDate>
  <lastBuildDate>Wed, 23 Jul 2008 15:54:50 +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=11514</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[SOLVED: Event ID : Yes. I already made that mistake...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38794&amp;title=solved-event-id#38794</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 23 July 2008 at 3:54pm<br /><br />Yes. I already made that mistake (oops) :) Thanks again!]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 15:54:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38794&amp;title=solved-event-id#38794</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID : Sounds good! Don&amp;#039;t forget...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38792&amp;title=solved-event-id#38792</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4342">StephenMurphy</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 23 July 2008 at 3:39pm<br /><br />Sounds good! Don't forget to delete the blank event in the DB if dlg.ShowNewEvent2(oEvent) returns False, ie the user hit the cancel button.<br><br>All the best.<br>]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 15:39:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38792&amp;title=solved-event-id#38792</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID : I had to alter this pretty heavily...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38785&amp;title=solved-event-id#38785</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 23 July 2008 at 1:12pm<br /><br />I had to alter this pretty heavily to make it work, but I got it. Essentially, I am adding a BLANK event to the DB to establish the ID, then when the event is updated, I call my Update Function on that event. Works great!<br><br>Thanks alot!<br>]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 13:12:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38785&amp;title=solved-event-id#38785</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID : It should work fine with the built...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38780&amp;title=solved-event-id#38780</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4342">StephenMurphy</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 23 July 2008 at 11:15am<br /><br />It should work fine with the built in dialogs. The only thing you need to do is add a new record to your db so you can get back your desired ID (or at least find out what the new ID will be, in case the user backs out in adding it to the calendar) before you create the new Event in the calendar. Something like this should work:<br><br>Private Sub CalendarControl0_DblClick()<br>Dim dp As CalendarDataProvider<br>Dim dlg As CalendarDialogs<br>Dim HitTest As CalendarHitTestInfo<br>Dim oEvent As CalendarEvent<br>Dim bRet As Boolean<br>Dim lID As Long<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Set dp = CalendarControl0.DataProvider<br>&nbsp;&nbsp;&nbsp; Set HitTest = Me.CalendarControl0.ActiveView.HitTest<br>&nbsp;&nbsp;&nbsp; Set dlg = New CalendarDialogs<br>&nbsp;&nbsp;&nbsp; dlg.ParentHWND = Me.hWnd<br>&nbsp;&nbsp;&nbsp; dlg.Calendar = CalendarControl0<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If HitTest.ViewEvent Is Nothing Then ' clicked on day rather than event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lID = FindNextID() ' Get your desired ID from your db by adding a new record or determining what the id will be...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If lID &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set oEvent = dp.CreateEventEx(lID) ' Create a new event with your id<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oEvent.StartTime = HitTest.HitDateTime<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oEvent.EndTime = DateAdd("h", 1, HitTest.HitDateTime)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bRet = dlg.ShowNewEvent2(oEvent)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If bRet = True Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "Item added"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' update your db using oEvent values or add it if you didn't before<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' user backed out, kill event in db<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ' user clicked on existing event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bRet = dlg.ShowEditEvent(HitTest.ViewEvent.Event)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If bRet = True Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "Item Edited"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' update your db with new info from HitTest.ViewEvent.Event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; End If<br><br>End Sub<br><br>]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 11:15:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38780&amp;title=solved-event-id#38780</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID :    Would this work using the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38769&amp;title=solved-event-id#38769</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 23 July 2008 at 8:32am<br /><br />Would this work using the builtin dialogs?<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlgCalendar.ParentHWND = hwnd<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlgCalendar.Calendar = Calendar1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dlgCalendar.ShowNewEvent<br><br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; .........<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'How do I retrieve the event object from this, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'so I can add it to the database<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  AddToDatabase(Event)<br>]]>
   </description>
   <pubDate>Wed, 23 Jul 2008 08:32:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38769&amp;title=solved-event-id#38769</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID : In my app, I never let the user...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38716&amp;title=solved-event-id#38716</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4342">StephenMurphy</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 22 July 2008 at 6:15pm<br /><br />In my app, I never let the user alter the Calendar info directly, so I don't have to worry about moving data from the Calendar to the data file. Only from the data file to the Calendar. I do this by intercepting the mouse clicks and bringing up my own forms which are interacting directly with the database. After that is done I update the Calendar event accordingly. Some pared down code:<br><br>Private Sub CalendarControl0_DblClick()<br>Dim HitTest As CalendarHitTestInfo<br>Dim bRet As Boolean<br>Dim vDate As Date<br>Dim lID as Long<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; Set HitTest = Me.CalendarControl0.ActiveView.HitTest<br><br>&nbsp;&nbsp;&nbsp; If HitTest.ViewEvent Is Nothing Then ' clicked on day rather than event...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vDate = Format(HitTest.HitDateTime, "m/d/yy")<br>&nbsp;&nbsp;&nbsp; ' check for valid date and make sure user wasn't clicking outside of calendar, etc<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' show my own event form in add mode and get back a new ID from mdb<br>&nbsp;&nbsp;&nbsp; lID =&nbsp; ShowAddEventForm(vDate) 'show event form in add mode<br>&nbsp;&nbsp;&nbsp; If lID &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; AddItemToCalendar(lID) ' calls CreateEventEx(lID) and fills in event details<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' user clicked on event, show my form<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ShowMyEventForm(HitTest.ViewEvent.Event.ID)<br>&nbsp;&nbsp;&nbsp; ' copy changes to calendar event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bRet = CopyItemToCalendarEvent(HitTest.ViewEvent.Event.ID, HitTest.ViewEvent.Event)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If bRet = True Then<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 'it was altered and should be updated&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.CalendarControl0.DataProvider.ChangeEvent HitTest.ViewEvent.Event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ' it was deleted and should be removed&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Me.CalendarControl0.DataProvider.DeleteEvent HitTest.ViewEvent.Event<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp; Me.CalendarControl0.Populate<br><br>End Sub <br><br>Hope this helps.<br>]]>
   </description>
   <pubDate>Tue, 22 Jul 2008 18:15:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38716&amp;title=solved-event-id#38716</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID : Thank you, that is a great solution!...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38707&amp;title=solved-event-id#38707</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 22 July 2008 at 1:58pm<br /><br />Thank you, that is a great solution! <br><br>The problem I have now, is the when a user double clicks the calendarto create an event, and AddEventEx is called, how do I now re-assignthat new EventID to the already created 'pEvent'?<br><br><br><font size="1">Private Sub Calendar1_EventAddedEx(ByVal pEvent As XtremeCalendarControl.CalendarEvent)<br>&nbsp; If Not CalendarEventAddedFromDB Then<br>&nbsp;&nbsp;&nbsp; <b><font color="#ff0000">pEvent.Id = AddEventToDatabase(pEvent)</font></b><br>&nbsp; End If<br>End Sub<br><br>Function AddEventToDatabase(ByVal pEvent As XtremeCalendarControl.CalendarEvent) As Long<br><br>&nbsp; 'Returns eventID of newly created event<br><br>&nbsp; Dim r As Recordset<br>&nbsp; Set r = OpenRS("AddCalendarEvent '" &amp; pEvent.StartTime &amp; "','" &amp; pEvent.EndTime &amp; "', " &amp; UserID &amp; ", '" &amp;Replace(pEvent.Subject, "'", "''") &amp; "', '" &amp;Replace(pEvent.location, "'", "''") &amp; "', '" &amp;Replace(pEvent.body, "'", "''") &amp; "'")<br>&nbsp; AddEventToDatabase = r.Fields(0)<br>End Function</font><br><br><br><br>]]>
   </description>
   <pubDate>Tue, 22 Jul 2008 13:58:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38707&amp;title=solved-event-id#38707</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID : I am doing very similar in my...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38651&amp;title=solved-event-id#38651</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4342">StephenMurphy</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 21 July 2008 at 6:57pm<br /><br />I am doing very similar in my app. Data is stored in the Events table in an mdb file. I wanted to use the RECORD_ID from the mdb file and make it the same for the Calendar event. <br><br>I set up as a custom provider in my Form open event:<br><br>Me.CalendarControl0.SetDataProvider "Provider=Custom"<br>Me.CalendarControl0.DataProvider.Open<br><br>and then responded to the DoRetrieveDayEvents event as follows:<br><br>Private Sub CalendarControl0_DoRetrieveDayEvents(ByVal dtDay As Date, ByVal Events As Object)<br><br>Dim oEvent As CalendarEvent<br>Dim sQuery As String<br>Dim db As Database, SourceSet As Recordset<br><br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; sQuery = "SELECT * FROM Events WHERE EVENT_DATE = #" &amp; dtDay &amp; "#);"<br><br>&nbsp;&nbsp;&nbsp; Set db = CurrentDb<br>&nbsp;&nbsp;&nbsp; Set SourceSet = db.OpenRecordset(sQuery, DB_OPEN_DYNASET)<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; ' no events found<br>&nbsp;&nbsp;&nbsp; If SourceSet.BOF Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SourceSet.Close<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; SourceSet.MoveFirst<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Do<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set oEvent = Me.CalendarControl0.DataProvider.CreateEventEx(SourceSet("RECORD_ID"))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oEvent.StartTime = SourceSet!EVENT_START<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oEvent.EndTime = SourceSet!EVENT_END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oEvent.Location = SourceSet!FACILITY_NAME<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oEvent.Label = SourceSet!COLOR_INDEX<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  'etc<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Events.Add oEvent<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SourceSet.MoveNext<br><br>&nbsp;&nbsp;&nbsp; Loop While Not SourceSet.EOF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; SourceSet.Close<br><br>End Sub <br><br><br>The CreateEventEx(ID) function will return you a new event object with your desired ID as the Event ID. You can then use the code:<br><br>Dim oDP As CalendarDataProvider<br>Set oDP = Me.CalendarControl0.DataProvider<br>' find event or create it<br>Set oEvent = oDP.GetEvent(lFindThisID)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If oEvent Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set oEvent = oDP.CreateEventEx(lFindThisID)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  ' use oEvent......<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  <br>]]>
   </description>
   <pubDate>Mon, 21 Jul 2008 18:57:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38651&amp;title=solved-event-id#38651</guid>
  </item> 
  <item>
   <title><![CDATA[SOLVED: Event ID :      I am manually populating...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38624&amp;title=solved-event-id#38624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4315">JasonG</a><br /><strong>Subject:</strong> 11514<br /><strong>Posted:</strong> 21 July 2008 at 10:03am<br /><br />I am manually populating a Calendar from a SQL Database. I want to Assign each event's ID based on the ID in the database, so when an Item is clicked, I know right away which database record is going to be affected. However, the ID does not seem to be writable.<br><br>There is no Event.Tag property I can see, or anything along that line.<br><br>The catch Is that I want to be able to use the .GetEvent property to quickly see if the event already exists.<br><br>Please advise as to what is the best way to accomplish this.<br><br><br><br><br>UPDATE:<br>I've also tried to use the CustomProperties collection, but when I goto to edit an event, I get an error "Object is no longer Valid"<br><br><br><font size="1">Private Sub Calendar1_EventChangedEx(ByVal pEvent As XtremeCalendarControl.CalendarEvent)<br>&nbsp; Dim SQL As String<br>&nbsp; SQL = "Update CalendarEvents Set " &amp; _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "StartTime='" &amp; pEvent.StartTime &amp; "', " &amp; _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "EndTime='" &amp; pEvent.EndTime &amp; "', " &amp; _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "EventTitle='" &amp; pEvent.Subject &amp; "' " &amp; _<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "Where EventID=" &amp; </font><font color="#ff0000" size="1"><b>pEvent.CustomProperties.Property("eventid").Value</b></font><font size="1"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp; Conn.Execute SQL<br>End Sub</font><br>]]>
   </description>
   <pubDate>Mon, 21 Jul 2008 10:03:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=11514&amp;PID=38624&amp;title=solved-event-id#38624</guid>
  </item> 
 </channel>
</rss>