Print Page | Close Window

Event:ID unique?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13540
Printed Date: 07 October 2024 at 1:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Event:ID unique?
Posted By: skiman
Subject: Event:ID unique?
Date Posted: 02 March 2009 at 3:14am
Hi,
 
I have a problem with the event:ID and the custom data provider using Xbase++.
 
At startup I add the events to the calendar from my database, with the CreateEventEx( eventid). After populating everything is loaded and shown on the screen. If I check the ID's of each event, everything is OK, the ID's are identical as in my database.
 
I place the cursor in the screen, and I click 'Click to add new event' and enter some information. After ENTER the DoCreateEvent is fired and I can save the event to my database. I see the new ID. I move the event, and sometimes the events receives a new ID. With the DoUpdateEvent I see the event has a new ID.
 
I can simulate it as follows :
  • I have 10 events with ID's : -1 , -3 , -5 , -7 , -9 , -11, -13, -15 , -17 , -19
  • I add a new event with the 'click to add new event'. In the DoCreateEVent I get an ID of -1. This is a duplicate!
  • I move the event, and the DoUpdateEvent shows me an ID of -2. This is a unique number. Problem is that I already saved my event with the DoCreateEvent.
  • I add a new event with the 'click to add new event'. In the DoCreateEVent I get an ID of -3. This is a duplicate!
  • I move the event, and the DoUpdateEvent shows me an ID of -4. This is a unique number. Problem is that I already saved my event with the DoCreateEvent.

Anyone who has found the same problem?

Regards,
Chris.
 


-------------
ABO Service



Replies:
Posted By: dkrapf
Date Posted: 05 March 2009 at 2:50am
Hi,

I discovered the following: The Callback function DoRetrieveDayEvents() in which I build the eventlist from my own database gets called automatically every two minutes (when the marker in the timeline Column skips forward). This changes the values of the event ids.
 


Posted By: skiman
Date Posted: 06 March 2009 at 10:04am

Hi,

I'm' using a customproperty to save my own unique eventid's. This seems to be a good solution to have control, and synchronisation with my own database.

Regards,

Chris



-------------
ABO Service



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net