Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastian Dammark 583 posts 1407 karma points
    Feb 15, 2017 @ 16:30
    Sebastian Dammark
    0

    GetApprovedRecordsFromFormOnPage = There is already an open DataReader ... bla bla bla

    When I follow the examples on this link below, I get the following error.

    Link: https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Working-With-Data/

    Error: There is already an open DataReader associated with this Command which must be closed first.

    Version: Umbraco version 7.5.6 assembly: 1.0.6185.24083

    This is my code:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @using Umbraco.Forms.Mvc.DynamicObjects
    
    <h1>@CurrentPage.Id</h1>
    
    <ul id="comments">
     @foreach (dynamic record in Library
               .GetApprovedRecordsFromFormOnPage (@CurrentPage.Id, "af21150b-d4fd-46cd-91a8-d43cadef1150").OrderBy("Created"))
     {
         <li>
              <h1>@record.Name</h1>
         </li>
      }
    </ul>
    

    Am I doing something wrong, or is it just something else ?

  • Laurent Lequenne 123 posts 248 karma points
    Dec 20, 2017 @ 08:28
    Laurent Lequenne
    0

    Any proactive action on this bug ?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies