加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-12 13:08:27 所属栏目:百科 来源:网络整理
导读:我正在编写一个应用程序,我也在使用ADO.NET: using System.Data.OracleClient; 代码示例: try{ OracleConnection myOracleConnection = new OracleConnection(connectionString); myOracleConnection.Open(); OracleCommand command = myOracleConnection.
我正在编写一个应用程序,我也在使用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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读