title: What to use for a flexible data access layer - OLEDB or...?
body: <p>I am creating a quick and dirty prototype (C#) of an object-relational mapping tool. I would like to support at least two kinds of databases - one will be Microsoft SQL Server 2005/2008 and the other most probably MySQL.</p>
  
  <p>Is there any way to use a single data base access mechanism for both database engines and what would it be? </p>
  
  <p>Of course, I know that there will be differences in SQL query syntax, but in my case it is not that important - I'll use a tool to generate SQL queries which suit the certain db engine and user will be able to optimize those SQL queries.</p>
  
  <p>The main idea is to have as flexible data provider solution as possible. Can it be done or not and how can it be done easier?
  Note that I am not using this for a production system, just for a prototype, but still I'm curious how it is achieved in production OR/M tools - are they using completely separate access mechanism for each data provider or there are something common? And are they using DataReaders or there is some more appropriate way to retrieve data if I intend to transform data to business objects?</p>
  
  <p>Thanks for any ideas, links etc.</p>