I have a business process that requires someone to manually copy/paste calls to stored procedures into SQL Management studio… Most of these stored procedures dont even have parameters or result sets. So my question is, can we call these procedures from a page in SP without having to build something in Visual Studo? I picture something like a button (or even hyperlink) that a non-tech user can just click on. This would clean up and simplify this process massively.
Of course, also getting rows from procedure results back into SP would be ideal. Then I could set up some simple reporting (using existing stored procedures) for user feedback. So they know when to click the next button or whatnot 😉
Any ideas dear SP community?
Hi Aarron – I finally got a chance to try it on a SharePoint 2013 Foundation and it worked…on my machine.
The basic process was:
- Create a Data Source using the stored procedure. When given the option choose “or specify customer Select, Update….” and on the Select tab, choose the stored procedure from the list.
- Create a new .aspx page and then on the Insert Tab> Data Source > Database Connections, insert the data source with the stored procedure.
- Add an empty repeater. You need something to reference the Data Source from above.<asp:Repeater runat=”server” id=”Repeater1″ DataSourceID=”SqlDataSource”/>
Every time the page is loaded, the stored procedure is run.
For giggles, using jQuery, I wired up button on another page to make an ajax call to the aspx page above.