you are right
my config :<property
name="dialect">NHibernate.Dialect.OracleDialect</property>
that is a wrong value.
public class OracleDialect : NHibernate.Dialect.Oracle9Dialect
NHibernate.Dialect
OracleDialect is compatible with Oracle 8.
but my oracle version is 10g,so I change the value
as:NHibernate.Dialect.Oracle10gDialect.
then problem solved.
thank you.
2009/11/30 Fabio Maulo <[email protected]>
> Probably you are not using the right dialect for the Oracle version you are
> using.
> btw you are even using an old version of NH (probably 2.0) because that
> dialect was removed.
>
> 2009/11/30 江名峰 <[email protected]>
>
> Hi fabio maulo
>>
>> my web.config like:
>> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
>> <session-factory>
>>
>> <property
>> name="dialect">NHibernate.Dialect.OracleDialect</property>
>> <property
>> name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
>>
>> <property
>> name="connection.driver_class">NHibernate.Driver.OracleClientDriver</property>
>> <property name="connection.connection_string">User ID=user
>> id;Password=pas;Data Source=ndwf</property>
>> <property
>> name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory,
>> NHibernate.ByteCode.Castle</property>
>> </session-factory>
>> </hibernate-configuration>
>>
>> and there is no exceptions, I have 10 records in DB, and set page size as
>> 2,it can return the first page,but other pages are empty:
>>
>>
>> IQuery query = DataSession.CreateQuery(m_defaultSelectCommand);
>> query.SetMaxResults(2);
>> query.SetFirstResult(0);// return first page with
>> 2 rows(index:0 to 1).
>>
>> -------------------------------------------------------------------------------------------------------------
>>
>> IQuery query = DataSession.CreateQuery(m_defaultSelectCommand);
>> query.SetMaxResults(2);
>> query.SetFirstResult(2);// return empty .
>>
>>
>>
>>
>> 2009/11/29 Fabio Maulo <[email protected]>
>>
>> exception ? OracleDriver ? OracleDialect ?
>>>
>>> 2009/11/29 江名峰 <[email protected]>
>>>
>>>> Dear all
>>>>
>>>> how to do paging on oracle database with NHibernate ?
>>>>
>>>> I have a solution to do paging on MSSQL database like :
>>>> IQuery query = DataSession.CreateQuery(m_defaultSelectCommand);
>>>> query.SetMaxResults(maximumRows);
>>>> query.SetFirstResult(startRowIndex);
>>>>
>>>> but it does not work on oracle database.
>>>>
>>>> --
>>>> 江名峰(James.Jiang)
>>>> msn:[email protected]
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "nhusers" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected]<nhusers%[email protected]>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/nhusers?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> Fabio Maulo
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "nhusers" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<nhusers%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>>
>>
>> --
>> 江名峰(James.Jiang)
>> msn:[email protected]
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nhusers" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<nhusers%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/nhusers?hl=en.
>>
>
>
>
> --
> Fabio Maulo
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
--
江名峰(James.Jiang)
msn:[email protected]
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.