Multi-catalog project with selfservicing

Posts   
 
    
jmcervera
User
Posts: 27
Joined: 03-Jun-2004
# Posted on: 27-Jun-2006 12:36:32   

Hello, Is it possible to use selfservicing for a project thas uses two different SQL Server databases? I got surprised when I saw only one connection string in app.config.

Which are my options? I would like to keep using the selfservicing model. Thanks

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 27-Jun-2006 14:42:09   

While this requirement is one of the reasons to use the Adapter model. There might be a workaround here: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=5288

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 27-Jun-2006 15:31:54   

You can use 2 databases in 1 application though. Walaa means switching between two databases at runtime. If you want to use 2 databases in 1 application, and have one part of your data in one db and the other part in the other database, you can: simply select the catalogs when you're creating the project and llblgen pro will find out which database to target at runtime. simple_smile You can connect with a connection string to one db, and still access the other (SELECT * FROM [catalog].[schema].[table])

Frans Bouma | Lead developer LLBLGen Pro
jmcervera
User
Posts: 27
Joined: 03-Jun-2004
# Posted on: 27-Jun-2006 15:49:25   

Thanks Walaa, but this is not exactly what I need.

I have to use one database for some entities (the database for the application I am developing) and another one for others (some related tables that I have to use, mostly only for reading but not always). This is, my entities are in diferent databases.

I am thinking in making database views in the new database for tables in the other database, and then having some entities that come from tables, and some entities that come from views. But I don´t like ths solution.

do I have to go with adapter? disappointed

jmcervera
User
Posts: 27
Joined: 03-Jun-2004
# Posted on: 27-Jun-2006 15:56:07   

Ah, Frans

I didn´t see your message before.

Yes its true, I have seen that the catalog name is harcoded in the code (sourceCatalogName property), and it works.

But I would like to change the databases in a configuration file.

Is this possible? May be this property could be override in some way for some entities? No?.

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 27-Jun-2006 16:29:31   

You can use name overwriting for that, please see "Application configuration through .config files" in the documentation simple_smile

Frans Bouma | Lead developer LLBLGen Pro
jmcervera
User
Posts: 27
Joined: 03-Jun-2004
# Posted on: 27-Jun-2006 17:24:03   

I'll try that. Thank you very much.