Click here to Skip to main content
15,882,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have problem to get record form my Oracle v 11.g Server DB.
It seems NHibernate and Fluent are not correctly access to Server. I try to fetch only first record in a query, I use FirstOrDefault instruction, but it converts in this Sql clausole: "FETCH FIRST 1 ROWS ONLY". This is compatible only in Oracle v 12 and later.

What is wrong? Maybe I have missed something in a connection string, how can I set server version in this one?

What I have tried:

Connection string in web config:

<add key="oracleDataSource" value="(DESCRIPTION=(ADDRESS =(PROTOCOL = TCP)(HOST = = 1521))(CONNECT_DATA=(SERVICE_NAME = XE)))" />

<add key="oracleUser" value="..." />
<add key="oraclePwd" value="..." />
Richard Deeming 24-May-18 10:10am    
You need to update your configuration to specify the correct dialect:
Chapter 3. ISessionFactory Configuration | 3.5.1. SQL Dialects[^]

Looks like you've set it to Oracle 12c, but you need to set it to Oracle 11g instead.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900