Hetal <(E-Mail Removed)> wrote in news:1177610297.674317.326590
@t39g2000prd.googlegroups.com:
> The challenge we face here though is that we had all our database as
> MS-SQL and we are moving them to MySQL one by one (some are already
> migrated to MySQL). And we would like to make our connect feature such
> that it dynamically creates a connection object (any of sql/oledb/
> odbc) based on what the back end is and what connection string/method
> we are using. Is there a possible way to make it dynamics?
You'll need to build a data abstraction layer. The problem with generic
data layers is that different databases support different features so I
believe that's why Microsoft created custom implementations for each
database.
However, there are a couple tools out there to make your ADO.NET "generic":
CoreLab's UNIDirect ADO.NET driver provides access to several database
platforms
Microsoft has the Data Access Application Blocks to may help to connect to
multiple databases.
You can use a DAL framework like LLBLGen Pro/CodeSmith (which contains
layers for several database).
You could build your own custom DAL.
I personally use the LLBLGen Pro DAL framework and it's great :-) Supports
SQL Server, MySQL, DB2, Firebird, Oracle, and more.
|