ExpandRecurrence_SP problem

3 posts, 1 answers
  1. Randy
    Randy avatar
    25 posts
    Member since:
    Jul 2013

    Posted 16 Sep 2014 Link to this post

    I recently implemented the SQL UDF/CLR solution found in this thread to help me with recurrence parsing:


    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]
        DECLARE @StartDate  DATETIME;
        DECLARE @EndDate    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
            -- 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]

  2. Answer
    Boyan Dimitrov
    Boyan Dimitrov avatar
    1728 posts

    Posted 19 Sep 2014 Link to this post


    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.

    Boyan Dimitrov

    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.

  3. DevCraft R3 2016 release webinar banner
  4. Randy
    Randy avatar
    25 posts
    Member since:
    Jul 2013

    Posted 06 Oct 2014 in reply to Boyan Dimitrov Link to this post

    I migrated the database to a SQL instance with more memory and was able to get the components working.

Back to Top