Enterprise Library and Oracle
Enterprise Library is a very useful framework that Microsoft gives away for free :) If you build a .NET application, of course ;)
Enterprise Library Data Access module offers an alternative to a self-written data access layer. And, as suspected, it doesn't only support Microsoft SQL, but also Oracle and other databases. Unfortunately, this is pretty much what you get in the Enterprise Library documentstion about Oracle connections - it can be done.
I first started with the EL Configuration Tool - easy to use and up front. The result was a web config file that I added to an ASP .NET application and then ran it. Surprise - it didn't work :). The error was "... an Oracle 8.* Client must be installed on the machine". What the documentation of the EL didn't say was that, in order to connect to Oracle, if the application is NOT running on the same server that Oracle is installed, then you need to install the Oracle Client Tools on the application server. The Client Tools install drivers that the .NET framework needs in order to access the database, and thus, the data. So I installed Oracle Client tools on my machine, according to what MSDN says here. I ran the application - error. Same error. I restarted the computer (
) and ran the application again - error.
But to end your pain :) here is the solution:
SCENARIO: .NET Application with Oracle Database. The two are installed on diferent servers. What you have access to is the application server.
SOLUTION: the server running the application must have installed:
-
Oracle Client Tools
-
Oracle Data Provider for .NET
The application web.config file must contain the section:
< add databaseType="Microsoft.Practices.EnterpriseLibrary.Data.Oracle.OracleDatabase, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" name="System.Data.OracleClient" / >








Recent Comments
Starting form the sample I mentioned
Thanks for posting this. It sav
The left image does not overlap t
Was Looking for the "inline" and "at