I would like to instantiate a Database object using Enterprise Library (v. 4.1 or v. 5.0) such that I can utilize an external source for my connection strings rather than storing them in a configuration file. In our case, we store all of our database
connection strings in a SQL Server or Oracle database which acts as a configuration database for all of our other databases.
I know that I can directly instantiate the correct database provider using the DbProviderFactories.GetFactory method directly from the System.Data.Common namespace, but then I lose all of the advantages of utilizing the Enterprise Library for my common data
Is there a way to accomplish the same thing using Enterprise Library and passing either a connection string or a database provider in order to obtain a handle to the correct ADO.Net Enterprise Library database provider? Currently, it seems that DatabaseFactory.CreateDatabase
only has 2 overloads and both of them require connectionString information stored in a configuration file.