Refreshing data model and lose mapping.

Posts   
 
    
dphoebus
User
Posts: 3
Joined: 18-Feb-2011
# Posted on: 18-Feb-2011 21:39:30   

Just got LLBLGen Pro v3.1 and after working with it for bit I have a question.

There are some complicated report procedures that I work with that LLBLGen does not recognize the result sets for. I generally see this when the procedures have temp tables in them or a bit of IF THEN ELSE branching. I can usually get around this by commenting out all the code except for the final select statements and this usual gets LLBLGen to pick up the result set(s).

The issue arises when I have to add a new procedure to the data model for a new report and I refresh the model I lose the result sets for the complicated stored procedures every time. I also lose are the mapping for the typed views that were created for these particular stored procedures.

Is there a better way to do this? Can I add a stored procedure to the model without having to refresh the data model?

Thanks for the help in advance!

Dan

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Feb-2011 06:53:26   

When refreshing the catalog, don't select the already mapped store procedures, just check the new one. Does that solve your issue?

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 20-Feb-2011 10:16:28   

This is indeed a problem: the refresh has to re-scan the resultsets as it can't assume things are the same again (otherwise you get the situation where the project thinks the db looks like ABC, while it looks like DEF)

Not sure if you can use a trick: create a dummy schema with the same tables and your procs. In the dummy schema, the procs have the lines commented out which are ruining the resultsets. Then add that schema to your refresh. You'll pull the stored procs from that schema. This might force you to re-map the typedviews.

At runtime, use schema name overwriting to overwrite the dummy schema name with the real schema name (see 'Application configuration through the config file in the llblgen pro runtime framework manual).

Frans Bouma | Lead developer LLBLGen Pro
dphoebus
User
Posts: 3
Joined: 18-Feb-2011
# Posted on: 21-Feb-2011 15:26:22   

Thanks for the responses. I will take a look into your workaround Frans. For the time being I am simply setting the result sets explicitly and working with dataset/datatables. I'm a little bummed to be losing the use of the typed views but I realize this is a short coming of MS SQL not providing a rock solid way of returning result set information every time.

I have an unrelated question though. I have been reading as much as I can on v3.1 and I see that LLBLGen has it's own framework. As it is I am currently using the Linq to SQL feature in LLBLGEN but I would like to see what else can be done with this application. I appear to be having some trouble trying to find some good examples of the LLBLGen Pro can do. Any help in where to look?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Feb-2011 15:36:44   

The web site is full of examples and tutorials.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 22-Feb-2011 10:09:06   
Frans Bouma | Lead developer LLBLGen Pro
dphoebus
User
Posts: 3
Joined: 18-Feb-2011
# Posted on: 22-Feb-2011 15:46:26   

Thank you fellas!