CliRefresher did not add procedures to LLBLProject

Posts   
 
    
Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 29-Jul-2009 10:45:41   

Hi

I should describe a little about the project we start, we use sql2008 and dotnet 3.5 i create an LLBLProject and have the following settings in Preference26.xml

<addNewElementsAfterRefresh value="true" /> <manualSelectSProcsFromSchema value="false" />

also set the first option in the project preferences to true and second option to false

i use the sa user for database .

i create a batch file that use CliRefresher to refresh the LLBLProject so the new objects take place in project next build it and the other steps .

the project have Entities, Views and Procedure nodes empty so i make a copy from it then refresh the copied version using CliRefresher , when i check the refreshed project both Entities and Views are filled with objects the problem is StoredProcedures that it is left empty!

i test a situation that a project with every thing included like Entities, Views and procedures so when i refresh it with CliRefresher it is update Entities and Views and clear procedures from the project

we have procedures in database and it is mandatory to have them in code . what should i do ! is there any problem with CliRefresher or any parameter ! disappointed

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Jul-2009 15:31:28   

PLease open the lgp file in the designer, and make sure addNewElementsAfterRefresh is set to true, in the Project Properties.

Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 29-Jul-2009 15:49:11   

i check it again and it is already True

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 29-Jul-2009 15:53:09   

In the Project Properties or the User Preferences?

Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 30-Jul-2009 10:51:16   

i'l check both Project-->Properties-->AddNewElementsAfterRefresh and File-->Preferences-->AddNewElementsAfterRefresh and both are True .

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 30-Jul-2009 23:09:50   

When you do a manual refresh in the designer is the option to read stored procedures from the database checked ?

Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 31-Jul-2009 11:09:49   

Hi i would like to thank you for replies.

if i have procedures already in the designer and do a manual refresh, when the refresh window open the checkbox for procedure is checked and disabled .

but in my case i have a blank project and i prepare it for batch process. if i want to do a maual refresh on this project the checkboxes for Entities, Views and Procedures should checked by myself.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 31-Jul-2009 13:57:08   

That's indeed a requirement: if there's no project element mapped onto a given type of element (e.g. table, view, proc), you won't get that 'type' of element from the db. This is an optimization. Once you have a proc call mapped in your project, it will be selected.

Frans Bouma | Lead developer LLBLGen Pro
Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 01-Aug-2009 07:22:19   

when i manualy refresh the project and select the procedures then it is gather all the procedures, the project now have the procedure nodes filled with data, when i refresh this project using CliRefresher the procedure nodes become empty !!! i dont know why that happen , i checked every thing for reading procedures and adding new elements in project properties !

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 01-Aug-2009 09:47:19   

Do you have at least one stored procedure call in the PROJECT (project explorer) or just all of them in the catalog explorer? If there are no procedure calls in the project (project explorer) then no procs are fetched from the db on refresh if the checkbox isn't checked (and it's checked if there's 1 or more stored proc call in the project)

Frans Bouma | Lead developer LLBLGen Pro
Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 01-Aug-2009 12:35:51   

I made a project and refresh it manually , adding new procedures to it. so the procedure nodes are Not Empty then i refresh it using CliRefresher. after that , i open the project and the procedure nodes are empty !

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 03-Aug-2009 09:55:11   

Are you sure the CliRefresher connects to the same database/catalog?

The clirefresher logs what it does into a log file. Would you please enable that option (on the commandline) and investigate the output.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 04-Aug-2009 08:58:35   

Also, you can debug the CliRefresher sourcecode. I did that and can't repro your issue. Some hints:

  1. That flag is retrieved from User Preferences not Project Properties.
  2. Check at debug that the preferences file is retrieved (LocalUtils.cs:LoadPreferences) and check that the flag is retrieved fine.
  3. Walaa's suggestion: Check that the correct catalog is refreshed. Investigate the log.
David Elizondo | LLBLGen Support Team
Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 04-Aug-2009 13:28:51   

first i investigate the log file to check that the correct catalog was refreshed , and it's OK and the correct catalog refreshed. second i check that the new objects like Views and Entities retrieved , but the procedures not. when creating the project i check the procedures checkbox , also preferences and properties are show the same value for AddNewElementsAfterRefresh. when i refresh a project with existing procedures , after refreshing procedures are removed from project ! but newly entity and views are added .

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-Aug-2009 06:12:32   

Hi again,

It's unfortunate you run into this. However I can't reproduce your issue. Could you please try to debug CliRefresher (provide the correct arguments at build options) and see what is going wrong? In special, check the line Engine.cs:174 (where the addNewElements take place), and LocalUtils.cs:166 (where the flag is retrieved from prefefences).

David Elizondo | LLBLGen Support Team
Ahmadi
User
Posts: 15
Joined: 28-Jul-2009
# Posted on: 08-Aug-2009 08:19:03   

thank you the problem is resolved ,

i didn't change anything in the source code of the CliRefresher just compile it and run ! it's now seems like a true version of CliRefresher, because when i have the nodes empty (doesn't manner the Entities or Views or Procedures) nothing added to that node.

in past version i have every node empty and refresher add every thing except procedures.

thank you for your help.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 08-Aug-2009 15:52:11   

Glad it's finally solved! simple_smile

Frans Bouma | Lead developer LLBLGen Pro