Invalid JSON on searching
Invalid JSON on searching
jmguillen
Posts: 11Questions: 1Answers: 0
Hi,
I am using DataTables 1.8.1 with server side scripting.
If I get the data without filtering the table is rendered ok.
But when using the search box the message "invalid JSON data..." pops up.
The weird thing is that the JSON generated seems to be ok (JSON Linted it on http://jsonlint.com/).
The dynamic SQL (Oracle) on the server script is ok too (the scripts sends an email with it)
Here the examples:
JSON generated:
[code]
{"sEcho":8,"iTotalRecords":"102","iTotalDisplayRecords":"3","aaData":[["IT_APPS","MULA","VALID","10","65536"],["IT_APP_NOTES","MULA","VALID","10","65536"],["IT_APP_DOCS","MULA","VALID","10","65536"]]}
[/code]
SQL:
[code]
SELECT TABLE_NAME, TABLESPACE_NAME, STATUS, PCT_FREE, INITIAL_EXTENT FROM (SELECT TABLE_NAME, TABLESPACE_NAME, STATUS, PCT_FREE, INITIAL_EXTENT, row_number() over (ORDER BY TABLESPACE_NAME asc) rowsNumerator FROM user_tables WHERE (TABLE_NAME LIKE '%APPS%' OR TABLESPACE_NAME LIKE '%APPS%' OR STATUS LIKE '%APPS%' OR PCT_FREE LIKE '%APPS%' OR INITIAL_EXTENT LIKE '%APPS%' )) qry WHERE rowsNumerator BETWEEN :iDisplayStart AND :iDisplayEnd ORDER BY rowsNumerator
[/code]
I am kind of lost here because the results from the server script look good...
Any clues?
Juan Martín.
I am using DataTables 1.8.1 with server side scripting.
If I get the data without filtering the table is rendered ok.
But when using the search box the message "invalid JSON data..." pops up.
The weird thing is that the JSON generated seems to be ok (JSON Linted it on http://jsonlint.com/).
The dynamic SQL (Oracle) on the server script is ok too (the scripts sends an email with it)
Here the examples:
JSON generated:
[code]
{"sEcho":8,"iTotalRecords":"102","iTotalDisplayRecords":"3","aaData":[["IT_APPS","MULA","VALID","10","65536"],["IT_APP_NOTES","MULA","VALID","10","65536"],["IT_APP_DOCS","MULA","VALID","10","65536"]]}
[/code]
SQL:
[code]
SELECT TABLE_NAME, TABLESPACE_NAME, STATUS, PCT_FREE, INITIAL_EXTENT FROM (SELECT TABLE_NAME, TABLESPACE_NAME, STATUS, PCT_FREE, INITIAL_EXTENT, row_number() over (ORDER BY TABLESPACE_NAME asc) rowsNumerator FROM user_tables WHERE (TABLE_NAME LIKE '%APPS%' OR TABLESPACE_NAME LIKE '%APPS%' OR STATUS LIKE '%APPS%' OR PCT_FREE LIKE '%APPS%' OR INITIAL_EXTENT LIKE '%APPS%' )) qry WHERE rowsNumerator BETWEEN :iDisplayStart AND :iDisplayEnd ORDER BY rowsNumerator
[/code]
I am kind of lost here because the results from the server script look good...
Any clues?
Juan Martín.
This discussion has been closed.