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:

Just wondered if you were able to confirm this as a bug?..not desperate for a fix but if I can’t use pagination I need to rethink the page layout/data structure quite substantially. I have to use SQL Server so not an option to shift to MySQL.

It certainly is a bug, do you also use PHP?

Hi @patrick yes I’m using PHP. Thanks,

Unzip the following file in dmxConnectLib/lib/db/server.

mssql.zip (856 Bytes)

That’s great seems to work perfectly…Thank you!

Fixed in Wappler 3.5.1

This topic was automatically closed after 27 hours. New replies are no longer allowed.