Hi afya,
I assume you have three databases (SQLServer, Oracle and MySql) with equivalent schemas (same tables, fields, relations, etc) and you want to connect to those three indifferently. Yes it is possible.
First of all, you need to use Adapter template set, the life is much easier using Adapter, in this case.
In general, you'd do:
- **Create **your SQLServer LLBLGen Pro project
- Use Project Converter (_Customer Area -> v2.6 downloads -> Extras -> Project Converter source code_) to convert SQLServer LLBLGen Pro project to an Oracle LLBLGen Pro project (original is kept, so you create a copy which is converted). Now you have two LLBLGen Pro projects (lgp's): one for SQLServer and one for Oracle
- Load the Oracle LLBLGen Pro project and check whether there are **type converters **needed because some types in SQLServer aren't available in Oracle.
- Use the **DDL SQL templates **(_Customer Area -> v2.6 downloads -> Tasks and Templates_) to generate from the Oracle project a create script so you can create the oracle schema (if you don't have the schema already).
- Generate from both projects code for Adapter. Before generate, please change the connectionString Key name on the Project Properties of each project. So the SQLServer project would be _SQLServer.ConnectionString _and _Oracle.ConnectionString _for Oracle so your app can differentiate them when creating the adapters.
- **Keep 1 generated DBGeneric **vs.net project (as you've kept them the same it's not important which one) and both DBSpecific projects.
- Do the same for MySql
Now you have a solution with three DBSpecific projects (SQLServerDBSpecific, OracleDBSpecific and MySqlDBSpecific) and one DBGeneric project.
Then in your code just create the appropiate adapter (YourRootNamespace.Oracle.DatabaseSpecific.DataAccessAdapter, and so on) based on some user selection.