Print Page | Close Window

DoReadRPattern Timeout

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=14205
Printed Date: 25 April 2024 at 4:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: DoReadRPattern Timeout
Posted By: mhuratdo
Subject: DoReadRPattern Timeout
Date Posted: 03 May 2009 at 5:34pm
I'm using the Activex Version of the calendar control with a custom data provider.

I can generate recurrence patterns (apparently ok) but when I try to read them I get a timeout. The problem seems to be because I'm reading the whole month and the DoRetrieveDayEvents is re-reading all the events every time.

This happens because the MakeRetrieveDayEventsSQL sql string retrieves all the events before the day been read (as in the C# example)

This should be ok, because I have to read the former events to be able to check if there is recurrence. I coded my program just like the C# example, but I get this timeout constantly.

In the other hand it doesn't seem to be a method for finding an event in the calendar (so i don't create the same event every time).

Any ideas? what should I do? change the SQL String or checking if the event exists?

This is the SQL string generated for today

SELECT * FROM dbo.Events WHERE (RecurrenceState = 0 OR RecurrenceState = 1) AND
(YEAR(dtFrom) < 2009   OR (YEAR(dtFrom) = 2009 AND (MONTH(dtFrom) < 5 OR MONTH(dtFrom) = 5 AND DAY(dtFrom) <= 3   ))) AND (YEAR(dtTo) > 2009 OR (YEAR(dtTo) = 2009 AND (MONTH(dtTo) > 5 OR   MONTH(dtTo) = 5 AND DAY(dtTo) >= 3 )))


Any ideas?



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