Problem with DoRetrieveDayEvents |
Post Reply |
Author | |
flam70
Newbie Joined: 08 January 2009 Status: Offline Points: 2 |
Post Options
Thanks(0)
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. |
|
austro
Newbie Joined: 03 October 2008 Location: Australia Status: Offline Points: 9 |
Post Options
Thanks(0)
|
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+=23Ldtendate ..Minute +=59FOR 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.DescriptionIF QRY_Calendar.IsMeeting <> 0 THEN pautevent>>MeetingFlag = TrueELSE pautevent>>MeetingFlag=FalseEND IF QRY_Calendar.Private <> 0 THEN pautevent>>PrivateFlag = TrueELSE pautevent>>PrivateFlag = FalseEND pautevent>>Label = QRY_Calendar.LabelID pautevent>>BusyStatus = QRY_Calendar.BusyStatus pautevent>>Importance = QRY_Calendar.ImportanceLevelIF QRY_Calendar.Alldayevent<>0 THEN pautevent>>AllDayEvent=TrueELSE pautevent>>AllDayEvent=FalseEND IF QRY_Calendar.IsReminder <> 0 THEN pautevent>>reminder = TrueELSE pautevent>>reminder = FalseEND 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.ScheduleIDIF brException THEN pautevent>>MakeAsRException pautevent>>RExceptionStartTimeOrig = QRY_Calendar.RExceptionStartTimeOrig pautevent>>RExceptionEndTimeOrig = QRY_Calendar.RExceptionEndTimeOrigIF QRY_Calendar.IsRecurrenceExceptionDeleted <> 0 THEN pautevent>>RExceptionDeletedTrue = TrueELSE pautevent>>RExceptionDeletedTrue = FalseEND END IF NOT brException THEN pautevent>>CustomProperties("process_RecurrenceState") = QRY_Calendar.RecurrenceState pautevent>>CustomProperties("process_RecurrencePatternID") = QRY_Calendar.RecurrencePatternIDEND lPEvents>>add(pautevent)END gwb LoadCal=TrueAX_ 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
|
|
starzen
Groupie Joined: 08 October 2008 Location: United States Status: Offline Points: 13 |
Post Options
Thanks(0)
|
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 stopi 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
|
|
Krog
Groupie Joined: 06 February 2008 Status: Offline Points: 100 |
Post Options
Thanks(0)
|
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 |
|
Krog
Groupie Joined: 06 February 2008 Status: Offline Points: 100 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |