Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> How to used mapped stored procedures (MS SQL)
 

Pages: 1
LLBLGen Pro Runtime Framework
How to used mapped stored procedures (MS SQL)
Page:1/1 

  Print all messages in this thread  
Poster Message
tkelley66
User



Location:

Joined on:
16-Apr-2013 22:37:16
Posted:
16 posts
# Posted on: 01-Feb-2018 18:58:59.  
I have created a new project and mapped the tables/stored procedures. How do I call the sp from my C# program?
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14529 posts
# Posted on: 01-Feb-2018 20:06:45.  
Did you map them to SP Calls, to TypedViews?

For the first, please check Calling a Stored Procedue

For the later please check Instantiating a TypedView mapped onto a Stored Procedure Resultset


  Top
tkelley66
User



Location:

Joined on:
16-Apr-2013 22:37:16
Posted:
16 posts
# Posted on: 01-Feb-2018 20:28:24.  
I mapped them to SPCalls (right click them in catalog view and selected Create Stored Procedure Call Definitions). The all appear under Stored Procedure Calls in the project view. If I try to type RetrievalProcedures., I don't see any of the stored procedures.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37635 posts
# Posted on: 01-Feb-2018 21:13:06.  
Did you make sure you retrieved the resultsets during the catalog meta-data retrieval? It's a page in the wizard which lists all stored procedures you've selected from the catalog and you have to specify which ones you want the designer to retrieve the resultset for. If you don't do that, all procs are seen as 'action' stored procedures.

Quote:
If I try to type RetrievalProcedures., I don't see any of the stored procedures.

I don't know what you mean, where did you type this?


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
jovball
User



Location:
USA
Joined on:
23-Jan-2005 19:53:47
Posted:
393 posts
# Posted on: 02-Feb-2018 14:57:15.  
I strongly prefer not getting the resultsets during the meta-data retrieval and assigning the resultsets in the designer via catalog explorer. That avoids any data changes caused by executing the stored procedures.

Right-click on the procedure and select "Set Number of Resultsets." Usually it would be 1. If it is 0, the call will be created as an ActionProcedure rather than a RetrievalProcedure and you won't get a resultset.

I think you have to assign the resultset count prior to creating the call definition but Frans could confirm that.
Joel Reinford
LLBLGenPro Version: 5.5.3
Templates: Adapter
Framework: .Net 4.6
Database: SQL Server 2012/2014, DB2 v10
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14529 posts
# Posted on: 02-Feb-2018 16:56:13.  
Indeed one should set the ResultSet count in the Catalog Explorer to a count more than 0 to be seen as a RetreivalProcedure rather than an ActionProcedue, then map the SP to SPCall.

  Top
tkelley66
User



Location:

Joined on:
16-Apr-2013 22:37:16
Posted:
16 posts
# Posted on: 02-Feb-2018 17:48:55.  
I did not specify which stored procedures to retrieve the result set for. After re-creating the project it worked fine.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37635 posts
# Posted on: 02-Feb-2018 22:00:21.  
jovball wrote:
I strongly prefer not getting the resultsets during the meta-data retrieval and assigning the resultsets in the designer via catalog explorer. That avoids any data changes caused by executing the stored procedures.

Right-click on the procedure and select "Set Number of Resultsets." Usually it would be 1. If it is 0, the call will be created as an ActionProcedure rather than a RetrievalProcedure and you won't get a resultset.

I think you have to assign the resultset count prior to creating the call definition but Frans could confirm that.

That's correct, and it's an alternative way to get retrieval procs indeed, thanks for the heads up Regular Smiley

Retrieving the resultset shapes can be beneficial tho, you can define typedviews on them, but if that's not your goal, the change to the # of resultsets for a proc is good enough Regular Smiley


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.