Hello,
I have a problem when using a custom data adapter:
if (dataManagerRequest.Skip != 0)
{
//Paging
DataSource = DataOperations.PerformSkip(DataSource, dataManagerRequest.Skip);
}
if (dataManagerRequest.Take != 0)
{
DataSource = DataOperations.PerformTake(DataSource, dataManagerRequest.Take);
}
When I perform the actions to skip and take, i get the following error:
Microsoft.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near 'OFFSET'.
Invalid usage of the option NEXT in the FETCH statement.
The row that throws the exception is this one:
OFFSET @__p_0 ROWS FETCH NEXT @__p_0 ROWS ONLY
I understand that this is due to an older version of the SQL Server I am connecting to, in this case version 90 (SQL Server 2005).
Is there a workaround? Or a way to specify the compatibility level in the Data Adaptor?
Thanks in advance.