Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
4.96 Mб

Overview of Oracle Data Provider for .NET (ODP.NET)

Overview of Oracle Data Provider for .NET (ODP.NET)

Oracle Data Provider for .NET (ODP.NET) is an implementation of a data provider for Oracle Database.

ODP.NET uses APIs native to Oracle Database to offer fast and reliable access from any .NET application to database features and data. It also uses and inherits classes and interfaces available in the Microsoft .NET Framework Class Library.

For programmers using Oracle Provider for OLE DB, ADO (ActiveX Data Objects) provides an automation layer that exposes an easy programming model. ADO.NET provides a similar programming model, but without the automation layer, for better performance. More importantly, the ADO.NET model allows native providers such as ODP.NET to expose specific features and datatypes specific to Oracle Database.

See Also: Oracle Data Provider for .NET Developer's Guide

Using ODP.NET in a Simple Application

The following is a simple C# application that connects to Oracle Database and displays its version number before disconnecting.

using System;

using Oracle.DataAccess.Client;

class Example


OracleConnection con;

void Connect()


con = new OracleConnection();

con.ConnectionString = "User Id=scott;Password=tiger;Data Source=oracle"; con.Open();

Console.WriteLine("Connected to Oracle" + con.ServerVersion);


void Close()





static void Main()


Programmatic Environments 1-29

Соседние файлы в папке Oracle 10g