I have read the accepted answer in the following post: ExecuteReader requires an open and available Connection. The connection's current state is Connecting
I am thinking about creating a class that will use an interface (dbConnection) to connect to an appropriate database i.e. SQL Server (SQLConnection) or Oracle (OracleConnection). The class will have methods for open,close,dispose etc plus a method to find the connection String. The class will allow an application to use the dbConnection interface to connect to either an SQL server database, an Oracle database or an Access database. The application in question connects to a number of databases.
I don't believe this breaks any rules stated in the accepted answer e.g. there are no shared variables. However, I am wandering if this is bad practice because of the reasons stated in the answer.
I will post some code if required.