Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Load Today's event
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Load Today's event

 Post Reply Post Reply
Author
Message
cmm2006 View Drop Down
Senior Member
Senior Member


Joined: 26 September 2006
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmm2006 Quote  Post ReplyReply Direct Link To This Post Topic: Load Today's event
    Posted: 11 October 2006 at 2:33pm
Hi,
How can I be able to load the list of all todays event in listbox (only today's event)?
Thank you! :)
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 11 October 2006 at 4:02pm
Hi,

Use RetrieveDayEvents method:


CalendarControl.DataProvider.RetrieveDayEvents(Now)


--
WBR,
Serge
Back to Top
cmm2006 View Drop Down
Senior Member
Senior Member


Joined: 26 September 2006
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmm2006 Quote  Post ReplyReply Direct Link To This Post Posted: 11 October 2006 at 4:58pm
Hi Sserge,
can you explain how to use CalendarControl.DataProvider.RetrieveDayEvents(Now), with a lisbox?
Thank you,
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2006 at 3:12am
Well, you'll have to code a bit 


Dim DayEvents As CalendarEvents
Set DayEvents = CalendarControl.DataProvider.RetrieveDayEvents(Now)
For i = 0 To DayEvents.Count - 1
    List1.AddItem DayEvents(i)
    List1.ItemData(i) = DayEvents(i).Id
Next


--
WBR,
Serge
Back to Top
cmm2006 View Drop Down
Senior Member
Senior Member


Joined: 26 September 2006
Status: Offline
Points: 118
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmm2006 Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2006 at 2:23pm
Thank you
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2007 at 10:14am
Can you give a little more info as to how this could be used to populate the day's calendar rather than a listbox?
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 17 January 2007 at 4:52pm
Originally posted by SteveB SteveB wrote:

Can you give a little more info as to how this could be used to populate the day's calendar rather than a listbox?


What do you mean?

Note that if you set up a Calendar to show some day, it will internally use this method to retrieve corresponding events from a data provider.

--
WBR,
Serge
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 18 January 2007 at 7:11pm
I am trying to load just one day's events as the Event table is quite large and appears to be effecting applicaiton performance when I try to switch days.
 
Can you also provide some additional guidance on using a custom data provider? I am thinking that I will have to use my own tables/fields......
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 2:54pm
Have you read this link: http://www.codejock.com/support/articles/com/calendar/cp_3.asp ?

Also search forum for "custom data provider" keywords and you'll find a lot of information...

--
WBR,
Serge
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 4:03pm
I have but, quite frankly, it is quite sparse on details.
 
I am looking to potentially connect to an Access DB. While I realize the built in DataProvider is for Access, there are other fields that I essentially need!
 
Any assistance would be appreciated!
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 4:16pm
Perhaps what I am looking for is just a way to populate the calendarcontrol via a recordset.....
 
can this be done even without a custom dataprovider?
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 4:23pm
Well, you can't populate the control with a recordset because its data provider has a richer behavior.

But if your task is just to enhance a standard appointment with additional fields (as far as I understood from your explanations) -- then the solution is quite simple.

You can use a standard Access Data Provider. Just run it once to create an MDB file with the structure which is required for Calendar. Then you can enhance this structure in any way you need, but do not delete or rename any fields, do not change their types. Control's data provider then will use only those fields which it really needs. And you in your code can use all other custom fields.

--
WBR,
Serge
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 4:35pm
thanks for responding so quickly.
 
Well then it sounds like I will need a custom dataprovider...
 
can you please provide a little guidance?
 
thanks!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 4:40pm
For understanding a custom data provider I would firstly suggest you to read the mentioned article. And for creating a data provider I would suggest you to try debugging any of our samples with it included. You'll see which methods are called, and what it a sequence of calls...

--
WBR,
Serge
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 4:44pm
but aren't your custom data providers in sample just for SQL/mySQL???
 
How could I use with access???
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 19 January 2007 at 5:15pm
They both are using ADODB to connect to database.

You can use it for Access as well.

--
WBR,
Serge
Back to Top
SteveB View Drop Down
Newbie
Newbie


Joined: 07 January 2007
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote SteveB Quote  Post ReplyReply Direct Link To This Post Posted: 21 January 2007 at 1:49pm
I've managed to populate the calendar using:
 

Dim strconn As String
strconn = "Provider=Custom;DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & App.Path & "\Data\Events.mdb;"
Call OpenProvider(cjCalendarData_SQLServer, strconn)
 
However, my multipe resources are gone.
It shows up as one calendar and all appointments are in that one calendar, not divided by resource.....
 
help!
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 22 January 2007 at 2:42am
Visible Schedules configuration is not stored/restored automatically. You have to write some lines of code to do this as you need.
 
For built-in Access DataProvider DataProvider.Schedule collection Stored/Loaded on Save/Open but how to configure calendar for schedules look at our samples.
 
VB Sample,  frmMain
    mnuMultiSchedulesSimple_Click
 
There is a helper object CalendarResourcesManager which can help to handle complex (andd simple) situations.
See
    mnuMultiSchedulesExtended_Click
 
--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.