gpt4 book ai didi

.net - Oracle 和 ADO.NET(不推荐使用 System.Data.OracleClient 中的类型。)

转载 作者:行者123 更新时间:2023-12-03 23:58:40 24 4
gpt4 key购买 nike

我正在编写一个应用程序,我也在其中使用 ADO.NET:

using System.Data.OracleClient;

代码示例:
try{
OracleConnection myOracleConnection = new OracleConnection(connectionString);
myOracleConnection.Open();
OracleCommand command = myOracleConnection.CreateCommand();
...
}

它有效,但我收到警告:
Warning 3   'System.Data.OracleClient.OracleCommand' is obsolete: 'OracleCommand has been deprecated. http://go.microsoft.com/fwlink/?LinkID=144260'    

我还有什么其他选择? “Microsoft 建议您使用第三方 Oracle 提供商。” ——

最佳答案

您应该使用 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
  • 关于.net - Oracle 和 ADO.NET(不推荐使用 System.Data.OracleClient 中的类型。),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8894858/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com