Oracle.DataAccess.Client vs. System.Data.OracleClient -- use which?

  • Thread starter Thread starter Ruffin Bailey
  • Start date Start date
R

Ruffin Bailey

When I started working on an ADO.NET application that accessed Oracle
9 on the backend, I downloaded and installed ODP.NET from Oracle
(http://otn.oracle.com/tech/windows/odpnet/index.html) which gave me
the Oracle.DataAccess.Client namespace.

Was impressed that the Oracle objects were in the VS.NET Help app --
until I finally figured out that's b/c there's a
System.Data.OracleClient in .NET 1.1 by default.

Other than a few minor syntax changes (like OracleDbType not existing
in System.Data.OracleClient), they seem to be the same thing.

Is there any technical reason to use one over the other? Though it's
a minor nuisance to install ODP.NET everywhere I install the app, I
will if that's a better route. If everything's equal, give or take,
however, I'll stick to the System.Data.OracleClient just for
simplicity's sake -- I guess. Still not completely convinced I
shouldn't use ODP.NET just so that I've got the vendor's data
connection code instead of something ultimately from a third party.

Thanks,

Ruffin Bailey
 
Hi Ruffin,

MS' provider requires 8.1.7 version while Oracle's require 9i r2 Oracle
client.
Plus, Oracle's provider has few more features.
I would stick with MS - I would use Oracle's provider only when necessary.
 
Hi Ruffin,

MS' provider requires 8.1.7 version while Oracle's require 9i r2 Oracle
client.

Doesn't MS' provider also require 9i client?
Plus, Oracle's provider has few more features.

a 'few' is a bit off base ;)
For starters, check out the way BLOBs are handled in ODP.NET vs how
they're handled in MS' provider. Second, compare the way how you can
populate a dataset with multiple cursors in ODP.NET vs the MS provider.
I would stick with MS - I would use Oracle's provider only when necessary.

I'd opt for Oracle's provider and only stick with MS' provider if you
can't use ODP.NET

FB
 
If the MS provider fits you needs, you can roll with it. It is easier, as
you do not have to install.

My personal preference, however, is ODP, as it opens up a world of
possibilities not present in MS OracleClient provider. With the ODP, you
have options for Oracle tables, better handling of REF CURSORS, et al. If
you do not need these, run with MS; otherwise, ODP.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
I would definitely advise ODP over the Oracle.DataAccess.Client especially if you are thinking about asp.net development. The version of oledb / odbc that worked on vb.net DO NOT WORK with asp.net and IIS 5. Though there are some strange errors ("Unable to find DLL" - oci.dll), the operation isn't possible under asp.net with oledb. I haven't tested this with non web-based applications but from what I've heard it doesn't matter, performance aside.

~Karl
 
Back
Top