我正在使用C#Windows窗体应用程序在Windows Server 2008 R2 Enterprise x64中使用NHibernate连接Oracle 11g数据库。我用了NHibernate的跟随配置:Oracle驱动程序与Windows Server x64中的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.Driver.OracleDataClientDriver'是否违背你的64位或你的32位ODAC? – DWright 2015-03-18 22:59:08
对不起,我不明白你的问题。安装的ODAC是ODAC1120320_32bit(奇怪的是:这个在两周前的测试中有效)。 SO是64位,应用中的平台目标是32位(与ODAC一致)。这回答你的问题?谢谢 – 2015-03-19 00:09:19
我从odac客户端文件夹引用C#中的odp.net dll。 – 2015-03-19 00:13:04