Wednesday, June 20, 2007

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 ( Cool ) 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:

  1. Oracle Client Tools
  2. 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" / >

Posted by Madalina at 09:48:26 | Permanent Link | Comments (0) |

Friday, December 15, 2006

SQL 2005 Express and Full Text Search

Full Text Search is available in SQL Express if the edition is Advanced Services. However, what you will not find very easily is that it only works on text columns, not image columns. I found a very helpful article on how you can use the Express to to your job with FTS in a very elegant manner. Here it is:

http://www.wherecanibuyit.co.uk/ASP/full-text-search.html

 

Posted by Madalina at 17:49:11 | Permanent Link | Comments (0) |