<?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 : help with GetEvent</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : help with GetEvent]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 29 May 2026 18:49:09 +0000</pubDate>
  <lastBuildDate>Thu, 05 Feb 2009 07:52:54 +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=13338</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[help with GetEvent : Hi all. I&amp;#039;m having troubles...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13338&amp;PID=45149&amp;title=help-with-getevent#45149</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4936">palaman</a><br /><strong>Subject:</strong> 13338<br /><strong>Posted:</strong> 05 February 2009 at 7:52am<br /><br />Hi all. I'm having troubles trying to understand the GetEvent method. It's suppossed with this method I'm able to get an event from its ID. I'm using MySql database (within a vb6 projet with the classess Codejock provides to help with). Everything works fine except a behavior that I don't understand. I'll briefly explain it (the code at the bottom):<br><br>oScheduler = calendar control<br>frmAppointment = event creator/editor<br>frmSelectSeries = edit-delete series or recurrence selector<br><br>My point is to get EventID (mysql table EventID field from specific event) from Dataprovider.Event.Id so I can pass it to my own edit event function as a parameter. But "oHitTest.ViewEvent.Id" gets a totally different  ID than database does. E.g If database EventID = 3... oHitTest.ViewEvent.Id = -1655 or something else (I assume this unique-number is generated randomly when the events are loaded into the calendar object each time it is created.)<br><br>If I use debbuger panel to manually get "oScheduler.Dataprovider.GetEvent(3).Id" then it works fine and it returns&nbsp; "3" as Id.<br><br>My question is, Is this working fine? If affirmative, then how can I use the Event.Id property to get the *real* ID (EventID from database) and not that random ID when I doubleclick on an event??<br><br>I hope you understand, and thank you in advance.<br><br>---------------------------code----------------------------<br><br><font face="Courier New, Courier, mono">Private Sub oScheduler_DblClick()<br>&nbsp;&nbsp;&nbsp; Dim oHitTest As CalendarHitTestInfo<br>&nbsp;&nbsp;&nbsp; Set oHitTest = oScheduler.ActiveView.HitTest<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If oHitTest.ViewEvent Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call frmAppointment.NewRecord(Me) 'click on blank, create new Record<br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If oHitTest.ViewEvent.Event.RecurrenceState &lt;&gt; xtpCalendarRecurrenceNotRecurring Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call frmSelectSeries.ChooseOccurrence(oHitTest.ViewEvent.Event.Subject, False)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case frmSelectSeries.lngResponse<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case Is = 0 ' press cancel<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case Is = 1 'only this recurrence<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call frmAppointment.EditRecord(oHitTest.ViewEvent.Event.ID, Me, 1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case Is = 2 'edit whole series<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call frmAppointment.EditRecord(oHitTest.ViewEvent.Event.ID, Me, 2)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call frmAppointment.EditRecord(oHitTest.ViewEvent.Event.ID, Me, 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Set oHitTest = Nothing<br>End Sub</font><br><br>]]>
   </description>
   <pubDate>Thu, 05 Feb 2009 07:52:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13338&amp;PID=45149&amp;title=help-with-getevent#45149</guid>
  </item> 
 </channel>
</rss>