Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle and ADO.NET (The types in System.Data.OracleClient are deprecated.)

Tags:

.net

sql

oracle

I'm writing a application, where I also work with ADO.NET:

using System.Data.OracleClient;

Code example:

try{
       OracleConnection myOracleConnection = new OracleConnection(connectionString);
       myOracleConnection.Open();
       OracleCommand command = myOracleConnection.CreateCommand();
       ...
   }

It works but I got warnings:

Warning 3   'System.Data.OracleClient.OracleCommand' is obsolete: 'OracleCommand has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'    

Whats other options do I have? "Microsoft recommends that you use a third-party Oracle provider." --

like image 821
eMi Avatar asked Jan 17 '12 12:01

eMi


1 Answers

You should be using ODP.NET (Oracle Data Provider for .NET)

Oracle Data Provider for .NET (ODP.NET) features optimized ADO.NET data access to the Oracle database. ODP.NET allows developers to take advantage of advanced Oracle database functionality, including Real Application Clusters, XML DB, and advanced security. The data provider can be used with the latest .NET Framework 4 version.

ODP.NET makes using Oracle from .NET more flexible, faster, and more stable. ODP.NET includes many features not available from other .NET drivers, including a native XML data type, self-tuning, RAC-optimized connection pooling, promotable transactions, and Advanced Queuing.

  • ODP.NET for Microsoft OracleClient Developers
  • Microsoft OracleClient to ODP.NET Application Migration
like image 101
CD.. Avatar answered Oct 09 '22 19:10

CD..