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)
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.