Pagination help.. Offset getting sent but nothing

#1

ok, been working on this for a few days so need help. Attaching screenshots.

Setup pagination here is my setup but giving 500 error when I click pages,

query manager:
image|287x500

server connect
image

Query server action
image

Pagination
image

#2

Additionally. If I do filter=0 no errors, if I do anything filter=1 or above. Error.

&dir=desc&offset=5

#3

Did you select fields in your database query action or just *

All sortable fields need to be selected explicitly in the query

#4

Also if you get error 500, check this to see the real error:

#5

Thank you. I did select fields, and the sorting actually works great but the pagination does not. I did enable debug and will try to narrow down the error.

#6

Very odd. offset 0 returns no error, anything other does

filter=0
{“clock_qry”:{“offset”:0,“limit”:1,“total”:3,“page”:{“offset”:{“first”:0,“prev”:0,“next”:1,“last”:2},“current”:1,“total”:3},“data”:[{“id_tc”:“145”,

filter=1
{“code”:“42000”,“file”:"D…omitted rest of line

#7

Could you post the exact error?

#8

ok, finally getting back to this. Seems to still be an issue and cannot think of why. Here is the error

{“code”:“42000”,“file”:“D:\home\site\wwwroot\dmxConnectLib\lib\db\Connection.php”,“line”:88,“message”:“SQLSTATE[42000]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near the keyword ‘AS’.”,“trace”:"#0

Sorting and all other functions work great across entire site but anything with pagination has an error and does not work.

#9

5 months later :slight_smile:

Why are you using ODBC and not directly the MS SQL driver for database connection?

ODBC is has less functionality

#10

lol I know right. Really started to get back to my projects and wappler.

Their was a specific reason, I cannot recall but let me try again.

#11

Thats why, I get Server Error: Could not find driver. Using MS SQL hosted in Azure.

#12

To close this up, I moved to MySQL from MSSQL both Azure. Performance is really much better on MySQL and it solved many problems I had.

2 Likes