This is a migrated thread and some comments may be shown as answers.

Incorrect syntax near 'OFFSET'.

1 Answer 182 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
Sandi Markon
Top achievements
Rank 1
Sandi Markon asked on 25 Mar 2015, 01:17 PM
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?

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 26 Mar 2015, 03:31 PM
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.

 
Tags
DataPager
Asked by
Sandi Markon
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or