Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Custom Provider & Schedules Object - Help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom Provider & Schedules Object - Help

 Post Reply Post Reply
Author
Message
vbuser View Drop Down
Newbie
Newbie


Joined: 22 January 2004
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote vbuser Quote  Post ReplyReply Direct Link To This Post Topic: Custom Provider & Schedules Object - Help
    Posted: 20 November 2007 at 11:40am
I'm using a CustomProvider, how do you load the schedules? This is how I'm doing it:
 
Set rs = cnADO.Execute(sSQL, adCmdText)
    If Not (rs.BOF And rs.eof) Then
        rs.MoveFirst
        Do While Not rs.eof
            i = i + 1
            ReDim Preserve pRes(i)
            Set pRes(i) = New CalendarResource
            If i = 0 Then
                pRes(i).SetDataProvider2 strConnectionString, True
            Else
                pRes(i).SetDataProvider CalendarControl1.DataProvider, False  
            End If
            'add the schedule to the resource
            pRes(i).Name = rs!ShortName & ""
            pRes(i).ScheduleIDs.Add rs!EmployeeNo & ""
                          
            'add resource to resource array
            arResources.Add pRes(i)
      rs.MoveNext
    Loop
      
    End If
    rs.Close
    Set rs = Nothing
   'add resource array to calendarcontrol
   CalendarControl1.SetMultipleResources arResources
 
They showup OK on the calendar, but when I add an event the following code does not work:
 
'Fill schedules combobox
    Dim pSchedule As CalendarSchedule
    For Each pSchedule In frmPaneScheduler.CalendarControl1.DataProvider.Schedules
        cboSchedule.AddItem pSchedule.Name
        cboSchedule.ItemData(cboSchedule.NewIndex) = pSchedule.ID
    Next
   
 
any help will be appreciate it! Thank you
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.047 seconds.