SelectAll - Delete: The incoming request has too many parameters.

SelectAll - Delete: The incoming request has too many parameters.

montoyammontoyam Posts: 568Questions: 136Answers: 5

I have added a SelectAll button to my datatable/editor. However, there are over 2100 rows of data and I am getting an error when the user needs to delete all of them (this is a 'temp' table used during a CSV import and they need to re-import each month. I was going to use an ajax call to delete the data that way, but thought I would check to see if there was a work-around using the editor

error: The incoming request has too many parameters. The server supports a maximum of 2100 parameters.

Answers

  • kthorngrenkthorngren Posts: 21,117Questions: 26Answers: 4,916

    Not sure form your description if this is using Editor to delete or if this is a different ajax request. Either way it sounds like the Ajax type you are using is GET and the parameters are sent. in the URL. Try changing the type to POST to have the parameters sent in the Headers.

    Kevin

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    using the Editor to delete i get the error message. Using ajax call it is just fine because I am just doing "delete from tablename". I'm thinking using the Editor to delete multiple selected lines, the editor must be using an in statement or something like that and that is why it is failing??

  • kthorngrenkthorngren Posts: 21,117Questions: 26Answers: 4,916

    Guess I was wrong. A google search of the error results in this SO thread that seems to explain the problem.

    Kevin

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    yeah, that is one of the posts I saw too. The answer was to break them into block of 2000. So, it sounds like there is no way to do this with the editor and I just need to stick with my ajax call, which runs a stored proc to delete.

  • allanallan Posts: 63,089Questions: 1Answers: 10,387 Site admin

    You could use ajax.data to delete the parameters you don’t want from the server, or alternatively, just get the list of id’s for the rows and submit that. Editor’s server-side libraries don’t actually use the submitted data other than the id’s, but it was such a commonly requested addition that I put that in.

    I guess another option is to alter the server’s config to allow more parameters.

    Allan

  • montoyammontoyam Posts: 568Questions: 136Answers: 5

    thanks for the reply. I am just going to stick with having the button use an ajax call instead of using the Editor delete. I am thinking that when you say to get the list of ids and submit that, there is where the issue is because there are more than 2100 rows to delete. and I can't do any server configuration changes. But, thank you again.

This discussion has been closed.