Generic ADO.NET Database connection string

Posts   
 
    
Developer
User
Posts: 58
Joined: 05-May-2004
# Posted on: 30-Jul-2004 07:15:18   

I am looking for a generic solution to access data, so I do not need to change my source code based on my client's database requirement.

What is the best way to design a .NET solution, which have generic Data Access Component like SQL Server, Access, Oracle, mySQL, DB2, and Ingres etc... - it means common code works with any database.

Any ideas, suggestions or comments are appreciated.

Regards, Developer

Developer
User
Posts: 58
Joined: 05-May-2004
# Posted on: 30-Jul-2004 12:17:21   

I found couple of interesting links:

http://developer.mimer.se/mpm/howto/howto_58.htm http://developer.mimer.se/mpm/documentation/html_123/mpmoverview/index.htm http://developer.mimer.se/mpm/ http://ccube.europe.webmatrixhosting.net/blog/articles/173.aspx

Otis, Is it possible to develop a common LLBLGen for all types of database using Mimer? flushed

Is anyone used Mimer or similar application before? does it have limited functionality?

Regards, Developer

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39826
Joined: 17-Aug-2003
# Posted on: 30-Jul-2004 12:34:11   

If it was possible it would have been implemented already simple_smile

A generic layer for all databases is only possible if you hide all database specific things behind an abstract layer. The generated code of LLBLGen Pro tries to do that but it requires that there is knowledge of the specifics of the db in the runtime libs and generated code. How would you otherwise be able to produce oracle specific code and sqlserver specific code or firebird specific code?

A lot of developers have tried to create a generic layer for all databases and none succeeded. The main problem: lack of implementation of the SQL standard.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 497
Joined: 08-Apr-2004
# Posted on: 30-Jul-2004 17:57:46   

We kind-of did it in our old application - that is we only defined standard sql in our data layer that would work with both SQL Server and Oracle, but I would hate to try it on other databases, and it did mean that performance suffered as a result rage

Developer
User
Posts: 58
Joined: 05-May-2004
# Posted on: 07-Aug-2004 11:34:13   

I was looking at ADo.NET v2.0 today and I found generic database object wink

Look at new Whidbey objects like DbProviderFactory, DbConnection etc...

First Look at ADO.NET 2.0 http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20040415adonetpc/manifest.xml

Surprisingly, It provides same performance as it reference to actual provider smile

Regards, Developer.

netclectic avatar
netclectic
User
Posts: 255
Joined: 28-Jan-2004
# Posted on: 09-Aug-2004 10:48:49   

Very nice, it's about time!