This is a migrated thread and some comments may be shown as answers.
ExpandRecurrence_SP problem
2 Answers 14 Views
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 16 Sep 2014, 06:12 PM
I recently implemented the SQL UDF/CLR solution found in this thread to help me with recurrence parsing:

http://blogs.telerik.com/aspnet-ajax/posts/08-08-04/working-with-radscheduler-recurring-appointments-on-sql-server.aspx

I am now getting the following error when running the store procedure that uses the UDF:

"Failed to open malformed assembly 'mscorlib' with HRESULT 0x80070008."

The error is directly related to the SP attempting to call the UDF.

I've included a copy of the stored procedure that is throwing the error.

Any ideas on what might be causing the issue?

CREATE PROCEDURE [dbo].[sp_Events_GetNext10EventsIncludeRecurring]
 
AS
BEGIN
    SET NOCOUNT ON;
 
    DECLARE @StartDate  DATETIME;
    DECLARE @EndDate    DATETIME;
 
    SET @StartDate = CAST(CONVERT(VARCHAR,GETDATE(),21) AS DATETIME);
    SET @EndDate = CAST(CONVERT(VARCHAR,GETDATE()+365,21) AS DATETIME);
     
-- List all appointments (recurring or not) in the given range
SELECT TOP 10 a.[EventID] as [EventID], a.[EventName] as [EventName], a.[Description] as [Description], a.[Location], ISNULL(o.StartDate, a.[StartDateTime]) as [StartDateTime], ISNULL(o.EndDate, a.[EndDateTime]) as [EndDateTime], a.[RecurrenceRule] as [RecurrenceRule], a.[RecurrenceParentID] as [RecurrenceParentID], a.[EventTypeID] as [EventTypeID], a.[EventType] as [EventType], a.[EventCategoryID] as [EventCategoryID], a.[EventCategory] as [EventCategory], a.[VenueID] as [VenueID], a.[VenueName] as [VenueName], a.[IsCityVenue] as [IsCityVenue], a.[RSVP] as [RSVP], a.[MinAttendees] as [MinAttendees], a.[MaxAttendees] as [MaxAttendees], a.[Notes] as [Notes], a.[AddedBy] as [AddedBy], a.[EditedBy] as [EditedBy], a.[DateAdded] as [DateAdded], a.[LastEdited] as [LastEdited], a.[Status] as [Status]
FROM    [vw_Details_Events_Active] a
    OUTER APPLY [dbo].[ExpandRecurrence](a.[RecurrenceRule], @Startdate, @EndDate) AS o
WHERE  
        -- Include non-recurring appointments in the range
        (a.[RecurrenceRule] IS NULL AND a.[StartDateTime] < @EndDate AND a.[EndDateTime] > @StartDate) OR
        -- And recurring appointments in range.
        (a.[RecurrenceRule] IS NOT NULL AND o.[StartDate] < @EndDate AND o.[EndDate] > @StartDate)
ORDER BY [StartDateTime]
 
 
END


2 Answers, 1 is accepted

Sort by
0
Accepted
Boyan Dimitrov
Telerik team
answered on 19 Sep 2014, 10:36 AM
Hello,

I tested the solution attached to the blog post but it works fine at my side. I searched for the error you are facing and I found a resource that explain this error is "SqlServer process ran out of memory (HRESULT 0x80070008)". Please review the following forum discussion in Stack Overflow.

Regards,
Boyan Dimitrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Randy
Top achievements
Rank 1
answered on 06 Oct 2014, 04:07 PM
I migrated the database to a SQL instance with more memory and was able to get the components working.

Thanks!
Asked by
Randy
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Randy
Top achievements
Rank 1
Share this question
or