我的机器上安装了Windows x64,当然 Oracle 还没有制作驱动程序来使用他们的客户端Oracle10g
,这对我来说似乎是一个大问题(停止抱怨)......
So i actually have to connect to DB with Direct Mode.
这是它的工作方式:
OracleConnectionStringBuilder oraCsb = new OracleConnectionStringBuilder {
Direct = true,
Server = "xxx",
Port = 1521,
Sid = "xxx",
UserId = "xxx",
Password = "xxx"
};
OracleConnection myConnection = new OracleConnection(oraCsb.ConnectionString);
myConnection.Open();
const string myInsertQuery = "SELECT * FROM MEMBERS WHERE ID = 1";
OracleCommand myCommand = new OracleCommand(myInsertQuery) { Connection = myConnection };
myConnection.Open();
try {
var source = myCommand.ExecuteReader();
} finally {
myConnection.Close();
}
实际上这种方式是有效的。
但这是我的问题,如何将它集成到 FluentNHibernate 中?
在这里怎么用?
_configuration = Fluently.Configure().Database(OracleClientConfiguration.Oracle10 .ConnectionString(@"server=xxx;user id=xxx;password=xxx;SID=xxx;port=1521;Direct=True;")
.UseReflectionOptimizer()
.AdoNetBatchSize(5000)
.ShowSql().FormatSql())
如何在没有 的情况下使其工作OracleClient (for 10g)
?