Using stored Procedure in Lightswitch?
-
Tuesday, November 08, 2011 12:36 PMDetail steps showing how to Use stored Procedure from an exisiting database with parameter in Lightswitch?
- Edited by Newbie Lightswitch Tuesday, November 08, 2011 12:37 PM
- Moved by Justin AndersonMicrosoft Employee, Moderator Monday, April 02, 2012 9:44 PM Not extensibility (From:Visual Studio LightSwitch Extensibility)
All Replies
-
Tuesday, November 08, 2011 3:11 PM
There is no built in ability to use Stored Procedure in LightSwitch. However there are workarounds. I have done both.
1. Create a RIA Service to call the Stored Procedure.
2. Create a Table which acts like a queue containing the Parameters of your Stored Proc. On the triggers you can call your Stored Proc. This also will allow you to have a kind of history of the calls.
Derek -
Tuesday, February 28, 2012 8:57 PM
Ha, bullet 1. is not as trivial as the brevity of it's staement implies. Been working on this for a few days. Been through a few articles. The only comprehensive article executed a statement against the northwind database. The author admitted he had no success trying against a remote SQL Server DB. Perhaps you would be willing to share all the details connected with bullet 1. I have not been able to make it work. The frame work throws an error the minute I call the Open method on the [SqlClient] connection object.
Thanks
Harold Rosenkrans
-
Friday, April 20, 2012 6:04 PMModerator
I have just published a blog article describing how you can accomplish this. Please see
- Proposed As Answer by Eric ErhardtMicrosoft Employee, Moderator Friday, April 20, 2012 6:04 PM
- Marked As Answer by Newbie Lightswitch Thursday, April 26, 2012 8:37 AM
-
Thursday, April 26, 2012 8:37 AMLooking forward for part 2
and also use it via wcf ria service
- Edited by Newbie Lightswitch Thursday, April 26, 2012 8:39 AM

