Different databases - Same server

Posts   
 
    
NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 14-Apr-2005 23:31:47   

Using Adapter mode

I have two databases on the same server and I want to access them both. I will create my database generic projects for both dbs, but do I need to have two database specific projects as well?

I'm assuming that if I do indeed need the two projects (or four as the case may be) that each entity will know what database specific project it talks to?

Just verifying what I'm sure you have done from day one. Thanks.

Rogelio
User
Posts: 221
Joined: 29-Mar-2005
# Posted on: 15-Apr-2005 00:39:10   

NickD wrote:

Using Adapter mode

I have two databases on the same server and I want to access them both. I will create my database generic projects for both dbs, but do I need to have two database specific projects as well?

I'm assuming that if I do indeed need the two projects (or four as the case may be) that each entity will know what database specific project it talks to?

Just verifying what I'm sure you have done from day one. Thanks.

Hi,

In your case, you only need a database specific project. The entities project is generic, that means you can use the same entities project with differents database specific project (SQL Server, Oracle, etc); but the structure of your database must be the same in all the servers (SQl, Oracle,etc)

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 15-Apr-2005 09:23:56   

Rogelio wrote:

NickD wrote:

Using Adapter mode

I have two databases on the same server and I want to access them both. I will create my database generic projects for both dbs, but do I need to have two database specific projects as well?

I'm assuming that if I do indeed need the two projects (or four as the case may be) that each entity will know what database specific project it talks to?

Just verifying what I'm sure you have done from day one. Thanks.

In your case, you only need a database specific project. The entities project is generic, that means you can use the same entities project with differents database specific project (SQL Server, Oracle, etc); but the structure of your database must be the same in all the servers (SQl, Oracle,etc)

100% correct for the situation: different databases with the same schema, but I think he wants to use 2 catalogs which aren't identical in a single project (but I'm not sure) simple_smile In that case, you need (in 1.0.2004.1, the current final version) to create per database a project and generate code, i.e.: a database generic and a database specific vs.net project.

In 1.0.2004.2, you can add multiple catalogs to the same project, so that will solve your problem.

In the case of multiple catalogs with the same schema, as Rogelio explained: you only need one codebase. You can switch between the databases by specifying the catalog name in the dataaccessadapter constructor using catalog name overwriting.

Frans Bouma | Lead developer LLBLGen Pro
NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 15-Apr-2005 16:30:02   

Otis wrote:

100% correct for the situation: different databases with the same schema, but I think he wants to use 2 catalogs which aren't identical in a single project (but I'm not sure) simple_smile In that case, you need (in 1.0.2004.1, the current final version) to create per database a project and generate code, i.e.: a database generic and a database specific vs.net project.

In 1.0.2004.2, you can add multiple catalogs to the same project, so that will solve your problem.

In the case of multiple catalogs with the same schema, as Rogelio explained: you only need one codebase. You can switch between the databases by specifying the catalog name in the dataaccessadapter constructor using catalog name overwriting.

Thanks guys. Sorry to have been vague flushed , but Frans guessed correct: two different catalogs.

Now, since 1.0.2004.2 is [soon] to come out, would you recommend I wait until its release before I write that portion? Would there be much to rewrite if I start it in 1.0.2004.1 and then switch to 1.0.2004.2?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 15-Apr-2005 16:53:15   

Well, if you start with 2 projects, and you want to move on later with just 1 project, I think it's best to use the beta now, or start with one catalog and next week use the 1.0.2004.2 to add the other catalog(s) to the project.

You can also still use just one catalog per project, if you don't need to add relations between entities of different catalogs. The beta is pretty stable, so you shouldn't have a lot of problems.

Frans Bouma | Lead developer LLBLGen Pro