Oracle 和 ADO.NET(不推荐使用 System.Data.OracleClient 中的类型。)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8894858/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle and ADO.NET (The types in System.Data.OracleClient are deprecated.)
提问by eMi
I'm writing a application, where I also work with ADO.NET:
我正在编写一个应用程序,我也在其中使用 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." --
我还有什么其他选择?" Microsoft 建议您使用第三方 Oracle 提供商。"--
采纳答案by CD..
You should be using ODP.NET (Oracle Data Provider for .NET)
您应该使用 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.
Oracle Data Provider for .NET (ODP.NET) 具有优化的 ADO.NET 数据对 Oracle 数据库的访问。ODP.NET 允许开发人员利用高级 Oracle 数据库功能,包括 Real Application Clusters、XML DB 和高级安全性。数据提供程序可用于最新的 .NET Framework 4 版本。
ODP.NET 使从 .NET 使用 Oracle 变得更加灵活、快速和稳定。ODP.NET 包括许多其他 .NET 驱动程序不具备的功能,包括本机 XML 数据类型、自调整、RAC 优化连接池、可提升事务和高级队列。