Does dataTables support calls to MS SQL Server stored procedures?
Does dataTables support calls to MS SQL Server stored procedures?
I've been reading the forums for the last 2 hours, but I couldn't find any support of stored procedure calls.
Without stored procedures as a data source, dataTables looks pretty useless for any serious project. No offenses please: this is just a bit of criticism.
I have a stored procedure with 800+ lines of code. Can you imagine how complex it is? I need to fill the dataTable with this SPs output. These is no way to replace the SP with either multiple joins or views. The logic is in there!
Is there any roadmap for that?
I am particularly interested in calling MS Server Server stored procedures.
btw, the https://datatables.net/development/server-side/ page is down or non-existent.
Replies
No offence taken. The server-side data store is irreverent to DataTables itself. You can use stored procedures, static files, grouped elephants, whatever you want. The key is to get the data out of whatever your data store is in JSON. DataTables is a client-side library so it won't help you do that (supported every server-side environment would be simply impossible). But most server-side environments will have an easy way to pull data out of their database and then encode it as JSON.
See this section of the manual for JSON data loading.
Allan
@allan, you are totally right. In terms of decomposition, a dataTable is just a component which accepts a typed parameter (in this case - a specific JSON string).
It took me about a day to craft the required functionality. Now I have the following logic implemented:
Thank you for guiding me.
I could to a tutorial of what I did to publish it on your web-site.
I'm sure others would appreciate it! Even if you were just able to publish the code that you've cooked up.
Allan