Multiple DBs, same type, different tables

Posts   
 
    
mdisbrow
User
Posts: 31
Joined: 22-Jun-2004
# Posted on: 25-Jun-2004 18:56:31   

Any suggestion on how to best use multiple SQL Server databases with different tables in the same project? I want to read from one SQL Server database's table and write to another SQL Server database's table (the columns in the source table are different from the destination table).

Thanks

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 25-Jun-2004 19:06:53   

I think you have to manually set the values of the destination entity. If tables don't match, you can't write the entity into the other db.

Frans Bouma | Lead developer LLBLGen Pro
mdisbrow
User
Posts: 31
Joined: 22-Jun-2004
# Posted on: 25-Jun-2004 19:13:59   

Sorry... I was looking for higher-level help... Do I need to create two LLBLGen projects (one for each database)? How do I reference entities in each database? Should I use the Adapter templates??

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 25-Jun-2004 20:08:29   

mdisbrow wrote:

Sorry... I was looking for higher-level help... Do I need to create two LLBLGen projects (one for each database)? How do I reference entities in each database? Should I use the Adapter templates??

You don't need adapter for that. Adapter is only needed if you want to read an entity from db A and write it without hassle in db B. As the db's are different, you can't do that.

You should create 2 projects, one for each database, give the connectionstring key in the project properties a different name and give them different root namespaces when you generate the code. You can then use both projects in the same application simple_smile

Frans Bouma | Lead developer LLBLGen Pro
mdisbrow
User
Posts: 31
Joined: 22-Jun-2004
# Posted on: 25-Jun-2004 20:09:50   

Thanks Otis... you're the man! sunglasses