Print Page | Close Window

Problem with DoRetrieveDayEvents

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=13146
Printed Date: 12 December 2024 at 8:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with DoRetrieveDayEvents
Posted By: flam70
Subject: Problem with DoRetrieveDayEvents
Date Posted: 12 January 2009 at 8:43am
Hello,

I use a custom provider and a hyperFile DB to store events. I have implemented the DoRetrieveDayEvents as explained in the documentation.

But when i open the provider with the open() method, DoRetrieveDayEvents is launching for each day in the week (Week view). If any events are found for the days in the view, the DoRetrieveDayEvents method  loops for all the following days. If events are found, the DoRetrieveDayEvents stops.  The same problem appears  when i click for the next week. If events are found, the method stops else the method loops.

I don't understand why. Is it a normal behavior ?. I don' t see anywhere that the open() method of the dataProvider object triggers the DoRetrieveDayEvents() !!!
Can someone explain to me how it works and how can i load events from my dataBase to the calendar component?

Thanks.

Sorry for my english, it's not my first language.



Replies:
Posted By: austro
Date Posted: 25 January 2009 at 8:27pm
Hi,
 
I not sure how to explain it, so I'll just share my solution.
In the Axtive control initialisation I have this code.
AX_Calendar>>SetDataProvider("Provider=Custom")AX_Calendar>>DataProvider>>Open()
ActiveXEvent("LP_AXC_DoRetrieveDayEvents",AX_Calendar,"DoRetrieveDayEvents")
In  the LP_AXC_DoRetrieveDayEvents Procedure I have this code

PROCEDURE LP_AXC_DoRetrieveDayEvents(dtDay , lPEvents=AX_Calendar>>CalendarEvents)

ldtNdate is DateTime = dtDay
pautevent is object Automation dynamic
pautevent = new object Automation "Codejock.CalendarControl.12.1.1"
IF NOT gbCalQueryDone
gbCalQueryDone=HExecuteQuery(QRY_Calendar,hQueryDefault,gsOwnerID)
END

Ldtendate is DateTime = Left(ldtNdate,14)

Ldtendate..Hour+=23

Ldtendate..Minute +=59

FOR ALL QRY_Calendar WHERE "QRY_Calendar.StartDate>='"+ldtNdate+"' AND QRY_Calendar.EndDate <='"+Left(Ldtendate,14)+"'"

pautevent = AX_Calendar>>DataProvider>>CreateEventEx(QRY_Calendar.CalendarID)

pautevent>>StartTime=QRY_Calendar.StartDate

pautevent>>EndTime=QRY_Calendar.EndDate

pautevent>>Subject=QRY_Calendar.Subject

pautevent>>Location=Calendar.Location

pautevent>>Body=QRY_Calendar.Description

IF QRY_Calendar.IsMeeting <> 0 THEN

pautevent>>MeetingFlag = True

ELSE

pautevent>>MeetingFlag=False

END

IF QRY_Calendar.Private <> 0 THEN

pautevent>>PrivateFlag = True

ELSE

pautevent>>PrivateFlag = False

END

pautevent>>Label = QRY_Calendar.LabelID

pautevent>>BusyStatus = QRY_Calendar.BusyStatus

pautevent>>Importance = QRY_Calendar.ImportanceLevel

IF QRY_Calendar.Alldayevent<>0 THEN

pautevent>>AllDayEvent=True

ELSE

pautevent>>AllDayEvent=False

END

IF QRY_Calendar.IsReminder <> 0 THEN

pautevent>>reminder = True

ELSE

pautevent>>reminder = False

END

pautevent>>reminderMinutesBeforeStart= QRY_Calendar.ReminderMinutesBeforeStart

pautevent>>reminderSoundFile = QRY_Calendar.ReminderSoundFile

pautevent>>Customproperties>>loadfromstring(QRY_Calendar.CustomPropertiesXMLData)

pautevent>>CustomIcons>>LoadFromString(QRY_Calendar.CustomIconIDs)

pautevent>>ScheduleID = QRY_Calendar.ScheduleID

IF brException THEN

pautevent>>MakeAsRException

pautevent>>RExceptionStartTimeOrig = QRY_Calendar.RExceptionStartTimeOrig

pautevent>>RExceptionEndTimeOrig = QRY_Calendar.RExceptionEndTimeOrig

IF QRY_Calendar.IsRecurrenceExceptionDeleted <> 0 THEN

pautevent>>RExceptionDeletedTrue = True

ELSE

pautevent>>RExceptionDeletedTrue = False

END

END

IF NOT brException THEN

pautevent>>CustomProperties("process_RecurrenceState") = QRY_Calendar.RecurrenceState

pautevent>>CustomProperties("process_RecurrencePatternID") = QRY_Calendar.RecurrencePatternID

END

lPEvents>>add(pautevent)

END

gwbLoadCal=True

AX_DatePicker>>RedrawControl()

I load each event into an object then call the the add event method, seems to work OK, I haven't been able to recurring events tpo work yet though.
Regards
Mark


Posted By: starzen
Date Posted: 06 February 2013 at 6:34am
have the same issue. If there are no events for the current view the control keeps calling back forever for future dates and will never stop. if there is at least one event it will stop
i also posted on the forum but my message is still moderated after a month. I also contacted support but have not heard from them yet


Posted By: Krog
Date Posted: 02 November 2013 at 8:38pm
I have the same problem

And others, and others...

And no solutions from them.

I think this company is dead! Unhappilly


-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2
Language: Visual Basic 6 SP6


Posted By: Krog
Date Posted: 02 November 2013 at 10:08pm

I've got a solution. Use this line of code on initialization, after opening the dataprovider:

  CalendarControl.DataProvider.CacheMode = xtpCalendarDPCacheModeOff

In this mode the dataprovider will retrieve the events for each date twice, but at least it is better than nothing



-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2
Language: Visual Basic 6 SP6



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