Ah thanks.The solution is remove those "ToShortDateString".

2009/9/22 Gustavo Ringel <[email protected]>

> The arithmetic operation has caused an overflow (using babylon :))
>
> On Tue, Sep 22, 2009 at 6:42 PM, Fabio Maulo <[email protected]> wrote:
>
>>  Die arithmetische Operation hat einen Überlauf verursacht.
>> in english ?
>>
>> 2009/9/22 Maik <[email protected]>
>>
>>
>>> Hey guys,
>>>
>>> i don't get my native sql-query to work.
>>> I hope you can help me.
>>>
>>> This is the code:
>>>
>>> var query = session
>>>     .CreateSQLQuery( "SELECT schema.function_name(:id, :from, :to)
>>> bvi FROM dual" );
>>> query.SetDecimal( "id", fundId );
>>> query.SetDateTime( "from", from.ToShortDateString() );
>>> query.SetDateTime( "to", to.ToShortDateString() );
>>> query.List();
>>>
>>> At the last step (executing the List()-method) I get the following
>>> exception.
>>>
>>> 2009-09-22 12:42:55,266 [10] WARN
>>> NHibernate.Util.ADOExceptionReporter [(null)] -
>>> System.OverflowException: Die arithmetische Operation hat einen
>>> Überlauf verursacht.
>>>   bei Oracle.DataAccess.Types.DecimalConv.GetDecimal(IntPtr numCtx)
>>>   bei Oracle.DataAccess.Client.OracleDataReader.GetDecimal(Int32 i)
>>>   bei Oracle.DataAccess.Client.OracleDataReader.GetValue(Int32 i)
>>>   bei Oracle.DataAccess.Client.OracleDataReader.get_Item(Int32 i)
>>>   bei NHibernate.Type.DecimalType.Get(IDataReader rs, Int32 index)
>>>   bei NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String
>>> name)
>>>   bei NHibernate.Type.NullableType.NullSafeGet(IDataReader rs, String
>>> name, ISessionImplementor session, Object owner)
>>>   bei
>>> NHibernate.Loader.Custom.CustomLoader.ScalarResultColumnProcessor.Extract
>>> (Object[] data, IDataReader resultSet, ISessionImplementor session)
>>>   bei
>>> NHibernate.Loader.Custom.CustomLoader.ResultRowProcessor.BuildResultRow
>>> (Object[] data, IDataReader resultSet, Boolean hasTransformer,
>>> ISessionImplementor session)
>>>   bei NHibernate.Loader.Custom.CustomLoader.GetResultColumnOrRow
>>> (Object[] row, IResultTransformer resultTransformer, IDataReader rs,
>>> ISessionImplementor session)
>>>   bei NHibernate.Loader.Loader.GetRowFromResultSet(IDataReader
>>> resultSet, ISessionImplementor session, QueryParameters
>>> queryParameters, LockMode[] lockModeArray, EntityKey
>>> optionalObjectKey, IList hydratedObjects, EntityKey[] keys, Boolean
>>> returnProxies)
>>>   bei NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
>>> QueryParameters queryParameters, Boolean returnProxies)
>>>   bei NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections
>>> (ISessionImplementor session, QueryParameters queryParameters, Boolean
>>> returnProxies)
>>>   bei NHibernate.Loader.Loader.DoList(ISessionImplementor session,
>>> QueryParameters queryParameters)
>>>
>>>
>>> Exeuting the function in SQLPlus succeeds.
>>>
>>> Any hints how to solve this problem?
>>>
>>> Regards,
>>> Maik
>>>
>>>
>>
>>
>> --
>> Fabio Maulo
>>
>>
>>
>
> >
>


-- 
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]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to