Reputation: 55
I am trying the jQuery datatables and its pretty amazing. What I need to do however is get data from a stored procedure (SQL Server 2012) which accepts a parameter. What are the options here? Do I have to build a web service to get the data or is it possible without creating a service layer?
Also I am unable to find an example that uses SP with parameters? If anyone has an example please share it with me.
Upvotes: 0
Views: 334
Reputation: 1288
No, a web service is not obligatory. Refer: Web service vs Direct connection to DB
If you have control over the SQL server, options of using the JSON/CSV format as acceptable to data-tables is always there. Check Data Sources for Datatables.
Avoid cross-origin error while trying to access local files (maintain directory structure i.e. parent/origin/target file paths). Refer Cross origins and local file access by Firefox
Hope some of it helps
Upvotes: 1