Thursday, January 16, 2014

Telerik OpenAccessLinqDataSource gives "Identifier expected (at index 3)" exception Chronicles on Migration From Entity Framework to Telerik OpenAccess - 2

Use default value of where parameter to prevent this
  <telerik:OpenAccessLinqDataSource runat="server" ID="edsDegree"
        ResourceSetName="Degrees" EntityTypeName=""
        Select=" new (ID,DegreeTypeID,MajorType,MajorType2,MinorType,SectionID,College,PlannedEntryDate,EntryDate,PlannedGraduationDate,GraduationDate,GPA)"
        ContextTypeName="DataModel.data"
        Where="it.UserID==@UserID">
        <WhereParameters>
            <asp:Parameter Name="UserID" Type="Int32" DefaultValue="0" />
        </WhereParameters>
    </telerik:OpenAccessLinqDataSource>

Or

Remove the "[" "]" from the  markup:
OrderBy="it.[Name]" --> OrdeBy="it.Name"

No comments:

Post a Comment