Thread:
 Configuration example for Oracle 
 mijaved   14 Sep 2008, 01:22 
 Re: Configuration example for Oracle 
 wizzsm   25 Sep 2008, 12:07 

Comment
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
From: wizzsm (25 Sep 2008, 12:07) Replies: 0, Views: 672
Subject: Re: Configuration example for Oracle
POST QUESTIONS ON THE FORUM! COMMENTS HERE SHOULD ADD VALUE TO THE
PAGE!On 14 Sep 2008 01:22, mijaved wrote:

>Where the hell is the Configuration example for Oracle!!!???

in your .cs the oracle driver info is:

if ("ORACLE" == database)
            {
                cfg.SetProperty(NHibernate.Cfg.Environment.Dialect,
"NHibernate.Dialect.Oracle9Dialect");
               
cfg.SetProperty(NHibernate.Cfg.Environment.ConnectionDriver,
"NHibernate.Driver.OracleDataClientDriver");
               
cfg.SetProperty(NHibernate.Cfg.Environment.ConnectionString,
connectionString);
            }

in assemblyinfo.cs add:
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;

in the exe.config use:

	<!-- Select the kind of database to use -->
	<!-- Possible values: MSSQL, MySQL, or ORACLE -->
	<appSettings>
		<add key="Database" value="ORACLE" />
		<add key="MSSQL.ConnectionString" value="Data Source=(local);Initial
Catalog=nhibernate;Integrated Security=SSPI" />
		<add key="MySQL.ConnectionString"
value="Server=localhost;Database=nhibernate;User ID=root;Password=" />
		<add key="ORACLE.ConnectionString" value="Data
Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=********.domain.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=*****)));User
ID=****;Password=****" />
	</appSettings>

and copy the following file from oracle into your product:

C:\oracle\product\10.2.0\db_1\BIN\Oracle.DataAccess.dll

Steve.
Prev. thread 
 Next thread
 
Prev. posting 
 Next posting
© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]