Print Page | Close Window

Multiple resources using Custom Provider..

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=10003
Printed Date: 07 October 2024 at 9:33am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Multiple resources using Custom Provider..
Posted By: mc2x
Subject: Multiple resources using Custom Provider..
Date Posted: 30 March 2008 at 1:46am
Hi all,

I am so lost and I don't know what to do anymore. Been searching the forum for the last three days about calendar activex but unfortunately my problem doesn't seem to have a clear solution.

My problem is about using custom data provider in the calendar
control. I wanted to use mssql as my data provider. I currently
have "schedules", "calendarevents", and "calendarrecurrencepatterns"
tables in my mssql. Data from calendarevents table have a parent
record from the schedules table. What I basically want is to show
the events from the calendarevents table under their corresponding
schedules. I have seen that this has no problem using the built-in
data providers as shown in the examples. But in mssql as the data
provider I find it rather confusing.

strcon = "Provider=custom;DSN=Calendar_SQLServer"

This is the connection string I'm using. Even though I have schedules
table in mssql I don't know why the statement:

    Dim pSchedules As CalendarSchedules
    Set pSchedules = pRes.DataProvider.Schedules

pSchedules.Count always return 0 when in fact I have around 5 records
in the schedules table. What I'm doing is that I manually loop thru
the schedules table and add the schedules manually to the resource
array.

This is where my main problem begins. After I have added the schedules
to the resource array, how in the world do I show the events under
that schedules in the calendar? I hope anyone could shed some light on me.

Thanks in advance.



Replies:
Posted By: Stilki
Date Posted: 03 April 2008 at 12:46am
 
Have  a look at this posting on multiple resources and multiple schedules.
Even though it is using Access databases, the sample(s) attached show you how to load schedules. The backend database does not matter.
 
https://forum.codejock.com/forum_posts.asp?TID=7473&PID=24699#24699 - https://forum.codejock.com/forum_posts.asp?TID=7473&PID=24699#24699




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