160,000 row cause error
160,000 row cause error
spiderkzn
Posts: 44Questions: 12Answers: 0
Hi,
I need help. As I have populate very large data which is 160, 000 row. When attempt and the loading took several second and cause error "This page is having a problem". But other datatable is fine.
I've read https://datatables.net/examples/server_side/
I've tried add
processing: true,
serverSide: true
but non it will work.
Please help
Thank
Answers
Did you write a script on the server that supports what is needed for server-side processing? You could also use our server-side processing libraries.
Allan
Hi Alan,
Thank you for link. I tried use it. it seem return with error if I change GET to POST.
Is there is solution to use GET instead of POST?
You can use GET if your server-side processing scripts are looking for GET rather than POST parameters. This example uses GET (different server-side processing script, but you haven't said what script you are using, posted any code, nor an example, so I'm kind of guessing here!).
Allan
My apology for not reply you asked.
I'm using ajax for javascript. See the code.
$("#tablename").DataTable({
paging: true,
info: true,
lengthChange: true,
stateSave: true,
stateDuration: -1,
ajax: {
url: getDataInfo,
type: "GET",
dataSrc: "",
headers: {
Authorization: bearerToken,
},
},
processing: true,
serverSide: true,
The rest I've done columnDefs, layout etc.
Allan is asking about your server side script. Are you using a server script provided by Datatables/Editor os your own script?
Server side processing is a client/server solution requiring the server script to perform paging, sorting and searching. It is expected that the server script will only return the rows, 10 for example, for the page being displayed.
When setting
serverSide
totrue
the server script is expected to support this protocol.Please provide more information about your server script.
Kevin
Hi Kevin,
Apology for not answer. As I'm not sure how to answer but what I've do is in ajax that call to HTTPGets where it will connect to SQL to use Stored procedure where it will run and receive the record. so the record will default getting 160,000 row which it cause the error.
Ok, so it sounds like you aren't using any of the server side processing scripts provided by Datatables. There are two choices to use Datatables server side processing:
Kevin