Oracle and ADO.NET (The types in System.Data.OracleClient are deprecated.)
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
eMi
I'm called eMi. Currently I'm working as a Junior Software Engineer. Lets say I belong to the new & younger generation of programmers and as of that circumstance I'm still learning and gaining experience. Worked with /- experienced in: C, C#, .NET, WPF, Java, HTML, CSS, ASP.NET Webforms and also some basic know-how in ASP.NET MVC 3, JavaScript (jQuery), Android-Development (Xamarin MonoDroid), iOS-Development (Xamarin MonoTouch), MVVMCross, SQL, SQL Server Compact, Entity Framework, Regular Expressions (RegEx), Bash, (XML and XSLT Transformations) Stackoverflow is a great way to exchange knowledge!
Updated on September 10, 2020Comments
-
eMi over 3 years
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." --
-
eMi over 12 yearsis that a DLL? Does the Syntax of Code change?
-
CD.. over 12 years@eMi: yes, its a DLL. there are some minor differences. (I remember I had to set the
BindByName
property to true) -
eMi over 12 yearsI use now ODP.NET, but cannot establish a Connection, because ConnectionString seems to be wrong. but its exactly the same. :(
-
eMi over 12 yearsGot it exactly, like in the Examples... thats the Exception:
ORA-12154: TNS:could not resolve the connect identifier specified