Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting C# to Oracle

Tags:

c#

oracle

What is the best library/driver to connect C# (.NET) application to Oracle 10g and 11g.
Current options that I found are:

  1. Oracle client that comes with database installation
  2. Oracle Instant Client (which is a bit confusing since it has 6-8 versions for number of operating systems)
  3. Microsoft ODBC ? (Can this be used?)
  4. ODP.Net - is this separate product or is it included in 1. and 2. ?

Can somebody explain differences?

I am planning C# application that will do basic CRUD operations on Oracle database. Which library/driver is smallest and easiest to install?

Edit:
General recommendation is to use ODP.Net. Now, can somebody please explain or point to answer about differences between client install packages. I found 3 different clients for Oracle 11g:

  • Oracle client - client drivers package that ships as part of database installation
  • ODAC - Oracle data access components, contains lots of things, among them are ODP.Net and Oracle Instant Client
  • Oracle Instant Client which also contains many things, including ODP.Net

So, which of those is enough for development? Oracle documentation is painfully detailed, but says nothing about differences between those client packages. I would go with smallest (Instant Client). Is it best choice?

Edit 2:
I am using .Net 3.5

like image 653
zendar Avatar asked Oct 26 '09 18:10

zendar


1 Answers

Microsoft will deprecate the System.Client.OracleClient namespace so I think it will be best to use ODP.NET. Make sure you download the latest one (ODP.NET 11g) as previous versions had some issues.

like image 164
Darin Dimitrov Avatar answered Sep 22 '22 02:09

Darin Dimitrov