MS Sql pagination error- incorrect syntax

Thanks for reporting an issue! Please spend 60 seconds reading this…

======== TEMPLATE BUG FORM ========

Wappler Version: 3.4.2
Operating System: Windows 10

Expected behavior

What do you think should happen?

Paginated server query should return paginated results

Actual behavior

What actually happens?

Server query returns an error:

message: "SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '75'.

How to reproduce

Only seems to impact running a paginated query using MS Sql, I’m using an Azure SQL database. Issue persists with hardcoded values in the server query so doesn’t relate to the GET variables being passed. Running the query with an offset value of 0 works fine. The incorrect syntax is always ‘near’ the end of the offset range (so offset of 50 will have ‘incorrect syntax near 75’ error).

image

Looks to be the same issue here:

and here:

Community Page
Last updated: