generating the stored procedures

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 22-Jan-2008 10:54:26   

version 1.0.2005.1 final (self-servicing) VS2005 asp.net 2.0


Hiya,

normally I just use the generated code, but I have to use a stored procedure because I'm using sqlDatasource to query simple lookup tables. (using llblGenPro dataSource isn't an option)

So, instead of a text command, I need to use "storedProcedure" commandType.

Can llblGenpro generate the stored procedures for me?

I see that there is ”Add store procedure calls” functionality, but how do I get llblGenPro to generate the sprocs in the first place?

If it doesn't do that, then is my only option to use the generated code and copy the generated sql from the profiler and manully paste this into a sproc that I manually create.

Please reply asap.

Many thanks,

yogi

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 22-Jan-2008 11:03:51   

Using the LLBLGen Pro Designer, when you read the catalog schema or when you refresh the catalog, you should mark the stored procedure checkbox to read their schema.

Then you should use the Stored Procedures Call node to select which SPs you map, either Retrieval or Action SPs.

And when you generate the code LLBLGenPro will provide you will methods to call which wrap the SPs call.

For more info, please consult the LLBLGen Pro manual: 1- Using the designer -> Adding stored procedure calls 2- Using the generated code -> Adapter/SelfServicing -> Calling a stored procedure

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 22-Jan-2008 11:17:36   

hiya Walaa,

but does llblGenPro generate the sprocs for me? That is the main question.

For example, if I create an entity, can't llblGenPro create sprocs that allow me to: 1) add 2) delete 3) update

..this particular entity?

Many thanks,

yogi

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 22-Jan-2008 11:26:52   

Oh no, LLBLGen Pro can only let you use existing SPs by generating functions calls to them.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 23-Jan-2008 10:08:56   

If you want sqlserver procs to be generated, pick up the free old llblgen tool wink http://www.sd.nl/software

Frans Bouma | Lead developer LLBLGen Pro
JKC
User
Posts: 16
Joined: 25-Jan-2008
# Posted on: 25-Jan-2008 22:30:29   

Otis wrote:

If you want sqlserver procs to be generated, pick up the free old llblgen tool wink http://www.sd.nl/software

Are you planning on adding this functionality to PRO? It seems silly to have to install both.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Jan-2008 02:04:13   

Copied from manual:

One of the design goals was to be database independent and we wanted to make it easy for the users of the generated code to produce queries on the fly and query for entity objects in a flexible manner, stored procedures produced a problem: their interface is set in stone and when you want to do something that is not programmed in the available set of procedures, you have to add another procedure.

And you also should read this Fran's article: http://weblogs.asp.net/fbouma/archive/2003/05/14/7008.aspx

So, personally I think that feature would contradict one of the LLBLGen's goals.

David Elizondo | LLBLGen Support Team