Hey,
The older version of our software had to run on Oracle, SQL Server, and DB2. We created an AdapterFactory that returned the correct DataAccessAdapter (configured via web.config). So the code looked like this:
using(AdapterFactory.GetDataAccessAdapter()) { ... }
We also dropped in a static string indicating which database was currently in use. Before that was added, we did conditional compilation symbols.
#if ORACLE
// Code
#else
// Other code
#endif
This was added because queries don't behave the same on each database. So in some cases we had to adjust the query differently for Oracle or vice versa. This became a nightmare and contradicts the entire idea of the AdapterFactory (you can switch the config, but it won't work right because of the compilation symbols might be wrong). Hence is why we added the static string.
So the example above became:
if(AdapterFactory.CurrentDB == "ORACLE")
In the last release I convinced my boss that it would be much more wise to only support SQL server because of our small team. If a customer demanded Oracle support, they pay extra for consulting fees (we host the solution now anyways, so this decision became easier). It is a maintenance nightmare, managing the different queries, managing update and install scripts between different database, making sure the DAL has generated the correct .NET types for all entities, etc. I am glad that chapter is finally over.
My advise is, don't support all the databases unless it is absolutely necessary. Imagine adding a column to your database. You must generate the update script for each platform. Then you must adjust any data. After that, you generate the new DAL, for each different platform. Every step you do you have to repeat multiple times, for each platform. Keep in mind each platform has it's own twist. Considering how often we change the database structure when coming out with a new version, this can easily add considerable time to the development cycle.
Thinking back on it, there are a few things our team could have done to make it more smooth. Even considering that, I still think it is a giant waste of time.