The ODP.NET Provider

Oracle also provides its own native provider called ODP.NET (see Table A-8). It can connect to an Oracle 8i or later database and be downloaded from http://otn.oracle.com/tech/windows/odpnet with documentation and code samples. The ODP.NET provider provides the standard connection-based and type-specific classes, and is actually quite similar in structure to the Microsoft provider for Oracle.

To use the ODP.NET types, add the reference to the Oracle.DataAccess.dll assembly in your Visual Studio .NET project, or use the following command line when compiling:

csc /r:Oracle.DataAccess.dll codeFile.cs
Table A-8. ODP.NET provider classes

Interface

Implementing class

IDbConnection
OraConnection
IDbCommand
OraCommand

IDataParameter, IDbDataParameter

OraParameter

IDataReader, IDataRecord

OraDataReader

IDataAdapter, IDbDataAdapter

OraDataAdapter
IDbTransaction
OraTransaction

Get ADO.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.