Print Page | Close Window

Again: Setting up Multiple resources with M$ SQL

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=4827
Printed Date: 22 November 2024 at 3:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Again: Setting up Multiple resources with M$ SQL
Posted By: flauzer
Subject: Again: Setting up Multiple resources with M$ SQL
Date Posted: 18 August 2006 at 6:32am
Sorry but (for me) the whole architecture of Multiple-Resource is source of confusion.
 
Suppose that the user A is enabled to see the events of resource R1 and R2....in the code we map "name" R1 e R2 with 2 long ScheduleIDs, with some Hash function....
In SQL event table we add ScheduleID field.
 
1) ..User A can view 2 resource so:
 

pRes0.Name = "Resource1"

pRes0.ScheduleIDs.Add HashforR1

arResources.Add pRes0

 

pRes1.Name = "Resource2"

pRes1.ScheduleIDs.Add hashForR2

arResources.Add pRes1
 
2) BUT  my problem is with providerSQLServer and SQLDataHelper:
 
I Must modify also code in property (MakeRetrieveDayEventsSQL, and so on)  to manage SQL SELECT  in accord with the scheduleID ??
 
Thanks
 
 
 
 
 
 
 
 



Replies:
Posted By: sserge
Date Posted: 21 August 2006 at 2:21pm
Yes, you must...
 
Note: Calendar expects that ScheduleID values (which you set to resources and events) should present in DataProvider.Schedules collection. (you have to fill it as well)

When you add a new Schedule to DataProvider.Schedules collection, the element's index is assigned as ID by default, but you can easily change ID to your value (other hash or something).

ps: attached see updated files from VB sample:
uploads/20060821_154751_f4827.zip - uploads/20060821_154751_f4827.zip

--
WBR,
Serge



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