简体   繁体   中英

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. Does anyone know of someone that has implemented this functionality having created your own OracleDatabase that derives from EntLib's Database. 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. 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?

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). See Oracle's Statement of Direction .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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