簡體   English   中英

Windows Server x64中與NHibernate的Oracle驅動程序連接

[英]Oracle Driver Connection with NHibernate in Windows Server x64

我正在Windows Server 2008 R2 Enterprise x64和C#Windows Form Application中工作,以使用NHibernate連接Oracle 11g數據庫。 我使用了以下NHibernate配置:

string connectionProvider = "NHibernate.Connection.DriverConnectionProvider";
string dialect = "NHibernate.Dialect.Oracle10gDialect";
//to use OracleDataClientDriver (ODP.NET), must configure the appropriated "Plataform Target".
//In Windows Server, is not possible work with ODAC x64, because the Windows Form Application don't accept
//"Platform Target" = "Any CPU" configuration. For this, it was intalled the ODAC1120320_32bit
connectionDriver = "NHibernate.Driver.OracleDataClientDriver";
string connectionString = ...

它工作了幾天,但是現在出現錯誤“無法從NHibernate.Driver.OracleDataClientDriver創建驅動程序”。 出現。 C#項目配置如下圖: 在此處輸入圖片說明 我真的不知道還需要做更多的測試,因為已經安裝了32位和64位ODAC,並且沒有安裝。 請幫忙。 謝謝。

如果使用的是Nhibernate 4,則可以使用OracleManagedDataClientDriver和odp.net托管驅動程序( https://www.nuget.org/packages/odp.net.managed/ )。 這是一個“任何客戶端”驅動程序,您無需在計算機上安裝任何程序。 它使支持Oracle非常容易。 無需再將ODAC .dll復制到您的部署目錄。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM