Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Problem with DoRetrieveDayEvents
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem with DoRetrieveDayEvents

 Post Reply Post Reply
Author
Message
flam70 View Drop Down
Newbie
Newbie
Avatar

Joined: 08 January 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote flam70 Quote  Post ReplyReply Direct Link To This Post Topic: Problem with DoRetrieveDayEvents
    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.
Back to Top
austro View Drop Down
Newbie
Newbie


Joined: 03 October 2008
Location: Australia
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote austro Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
starzen View Drop Down
Groupie
Groupie
Avatar

Joined: 08 October 2008
Location: United States
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote starzen Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Krog View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Krog Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Krog View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Krog Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.