Executing a Simple Stored Procedure in LightSwitch

This sample shows you how to execute a simple stored procedure in Visual Studio LightSwitch. This involves writing code that executes on the middle tier and invoking that code from a client side button.

 
 
 
 
 
(2)
4,606 times
Add To Favorites
4/18/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to Ask a Question


  • What changes are needed to execute this simple stored procedure with the VSLS HYML Client (Update 2)?
    1 Posts | Last Post May 15, 2013
    • What changes are needed to execute this simple stored procedure with the VSLS HYML Client (Update 2)? I have not been able to find an example.
  • Any caveats concerning the connection string?
    2 Posts | Last Post February 12, 2013
    • I'm having trouble connecting to my instance of Sql Server. 
      
      "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
      
      Named Pipes is enabled and the server has been restarted. Here's my string:
      
      connectionString="Provider=SQLNCLI11.1;Integrated Security=SSPI;Initial Catalog=AdventureWorks2012;Data Source=Z7561\MSSQLSERVER" />
      
      Thanks.
    • Try using the following format: 
      connectionString="Data Source=Z7561\MS​SQLSERVER;Initial Catalog=Adventu​reWorks2012;Integrated Security=True"
      
      I don't suggest using "Provider=SQLNCLI1.1". 
      
      See http://msdn.microsoft.com/en-us/library/ms254500(v=VS.80).aspx for more help on using connection strings.
  • Great Job!!
    1 Posts | Last Post April 30, 2012
    • Awesome!! Great samples!!!