Copying LLBLGen projects

Posts   
 
    
cjmos
User
Posts: 15
Joined: 04-May-2007
# Posted on: 31-Jul-2007 12:50:53   

Hi,

We currently have one working application which uses and LLBLGen DAL. Now we want to create a few more of these applicaitions that are essentially identical but that connect to different databases.

The problem is that our LLBLGen project has a lot of custom relationships set up (that are not set up in the DB) but I can't find a way of duplicating a project, including these relationships. I've tried to copy the project but I can't change the database it gets it schema from. I've had to recreate the project for each db and manually set up all the relationships again (I can't set them up in the database as there is a lot of old shared data in there which would take days to sort out to allow referential integrity). This is taking me hours.

Is there any solution to this?

Thanks,

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 31-Jul-2007 17:51:57   

If your target database is the same in the sense of layout, you don't need to do anything: just use catalog/schema name overwriting as described in 'Application configuration through config files' in the help file.

If your project is 'slightly' different (i.e. some tables have different names, or there are different fields here and there) follow these steps: - create a COPY of the .lgp file. From now on use that COPY - load the copy in the designer - right click the Project node in the project explorer, select properties and rename the project. Also rename the project node to the name of the new project so you know you're working with a different project. - go to the catalog explorer - right click any catalog/schema you want to rename so next time you refresh the catalog it will connect to THAT name. Rename the catalog/schemas to the catalog/schemas of your new project. So example: if your current project works with CustomerABC database and the CustomerXYZ database is almost the same, simply rename the catalog in the copy project you've loaded to CustomerXYZ. You can rename catalogs and schemas by rightclicking them simple_smile - refresh the catalog. Connect to the right server and the new catalogs/schemas are already preselected. - After the refresh, examine the log carefully to see what has changed.

This should make converting the project a 5 minute process simple_smile .

But it would be good to know how different the databases are so we can give you proper advice simple_smile

Frans Bouma | Lead developer LLBLGen Pro
cjmos
User
Posts: 15
Joined: 04-May-2007
# Posted on: 31-Jul-2007 18:14:06   

Thanks for your help.

Some of the databases do have very small (rediculous in my opinion) differences in structure, so unfortunately they will need their own .lgp projects. Your solution works great though, I've just made my first successful DAL copy simple_smile

On a side note, if we do have multiple applications with identical databases, is it possible to have an LLBLGen project that can generate multiple Dal projects, one for each application?

Thanks,

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 31-Jul-2007 18:44:22   

cjmos wrote:

Thanks for your help.

Some of the databases do have very small (rediculous in my opinion) differences in structure, so unfortunately they will need their own .lgp projects. Your solution works great though, I've just made my first successful DAL copy simple_smile

Great simple_smile

On a side note, if we do have multiple applications with identical databases, is it possible to have an LLBLGen project that can generate multiple Dal projects, one for each application?

Thanks,

Yes. Just generate once and simply use catalog/schema name overwriting via the config file as described in 'Application configuration through config files' in the manual. simple_smile

Frans Bouma | Lead developer LLBLGen Pro