I am using Enterprise Library 2006 - Data Access Application block I need to use Oracle’s Oracle.DataAccess data provider. (NOT System.Data.OrcacleClinet )
I am able to connect the my oracle database:
Oracle.DataAccess.Client.OracleConnection connection = new OracleConnection("user id=me;password=pswd;data source=localhost");
But that is not good enough. What I need is
private Microsoft.Practices.EnterpriseLibrary.Data.Database db; // DB Factory object reference
db = DatabaseFactory.CreateDatabase();
DbConnection connection = db.CreateConnection();
Enterprise Library DAB DatabaseFactory doesn’t seem to support Oracle’s Oracle.DataAccess.Client data provider.
How can I configure the Data Access Application block to use Oracle’s Oracle.DataAccess data provider?
Just add the connection string in your app.config or web.config as normal.
When you do:
Database database = DatabaseFactory.CreateDatabase();
the DAAB will use the GenericDatabase Class to work with the data provider.
I would do a search in these forums on Oracle because there has been a lot of discussion on this topic in the past.
Microsoft MVP C#