简体   繁体   English

使用Microsoft Enterprise Library 6.0的Oracle Data Provider(ODP.NET)?

[英]Oracle Data Provider (ODP.NET) using Microsoft Enterprise Library 6.0?

I am using ODP.NET's Oracle.DataAccess.Client 4.112.2 as my Oracle Data Provider and EntLib 6.0. 我使用ODP.NET的Oracle.DataAccess.Client 4.112.2作为Oracle数据提供程序和EntLib 6.0。 Does anyone know of someone that has implemented this functionality having created your own OracleDatabase that derives from EntLib's Database. 是否有人知道已经实现了此功能的人员创建了自己的从EntLib的数据库派生的OracleDatabase。 I have tried the following: 我尝试了以下方法:

var factory = new DatabaseProviderFactory("Oracle.DataAccess.Client");
var db = factory.Create("MyConnection");
var conn = (Oracle.DataAccess.Client.OracleConnection)db.CreateConnection();
conn.Open();
Console.WriteLine("Connection Successful!!!\nDatabase Type: \n" + db.GetType());
conn.Close();

This connects fine, however when I call db.ExecuteNonQuery(), I get an error "Parameter discovery is not supported for connections using GenericDatabase" as the generic database return does not know how to check for parameters, using ODP.NET. 这可以很好地连接,但是当我调用db.ExecuteNonQuery()时,出现错误“使用GenericDatabase的连接不支持参数发现”,因为通用数据库返回不知道如何使用ODP.NET来检查参数。 EntLib Contrib project has a solution to this problem for EntLib v5.0 however some of the stuff there is not supported in 6.0 and the latest release they have is for 2011. Please if anyone can assist with a solution? EntLib Contrib项目为EntLib v5.0解决了此问题,但是6.0中不支持其中的某些内容,而它们的最新版本是2011年的。请问有人可以提供解决方案吗?

The Oracle Client is not supported (does not function correctly) under Windows 8 and Windows Server 2012. Support is expected sometime in the (hopefully near) future with the 11.2.0.4 release (you're using 11.2.0.2). Windows 8和Windows Server 2012不支持Oracle客户端(不能正常运行)。希望在将来(希望不久)使用11.2.0.4版(您正在使用11.2.0.2)支持。 See Oracle's Statement of Direction . 请参阅Oracle的发展方向说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM