Incorrect syntax near 'OFFSET'.

2 posts, 0 answers
  1. Sandi Markon
    Sandi Markon avatar
    101 posts
    Member since:
    Jul 2012

    Posted 25 Mar 2015 Link to this post

    Using DataPager with GridView, when navigating on site other than first, I get error:
    "Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement."

    I get that on production environment, but not development environment. I found out on the internet that the problem might be in SQL server 2008 not supporting the query as built by DataPager. I might concur as that is what is installed in production while I have 2012 on dev env.

    Is that correct? Does RadDataPager require SQL server 2012 or is there a way to use it on 2008? Or could the problem be somewhere completely elsewhere?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 26 Mar 2015 Link to this post

    Hi Sandi,

    RadDataPager does not have any such requirements or limitations. 

    It internally builds a query appending Skip and Take clauses and then this query is to be executed on the server every time you navigate to a page.  When binding the pager to a LINQ-enabled data source (i.e. IQueryable), the paging will happen on the server out-of-the-box. In case the pager is bound to an IQueryable, it will automatically append Skip(n) and Take(m) statements to this query.

    Would you please share some more information on how do you use our control?


    Regards,
    Dimitrina
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. DevCraft banner
Back to Top