ADO.NET makes developing for different databases harder

Hmm… I suddenly realized that my focus these days is development. Interesting.
I’m wondering if there is an easier way for a .NET application to natively support different databases in the same code base. For instance, when I do SQL Server, the .NET Data Provider I would use is SqlConnection. If it is OLEDB, then it’s the OleDbConnection namespace.
Now each of these namespaces have their own DataReader object, which is the primary data object I use. How can I write the application such that I can automatically choose which one to use (based on a parameter), without coding different sections for each data provider?
MSDN, here I come!

Share this:

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Notify me of follow-up comments by email.

Notify me of new posts by email.

About Me

When heroes and expectations fall, the beggar lauds the dime. When someone wants to do it all, but cannot find the time.
Suffice to say that made no sense, but nobody will mind. With time I hope to find the will, to write a better line.