Hey Oskar, Thanks for responding.
The C# type of the receiving object is a float.  NHibernate auto decides to
use a Decimal type.
I'm still stuck on this problem... and I'm not sure I'm communicating it
effectively.

Thanks, Eli

On Sun, Nov 6, 2011 at 6:05 AM, Oskar Berggren <[email protected]>wrote:

> What is the C# type of the field/property in the object that will
> receive the value from the database?
>
> /Oskar
>
>
> 2011/11/5 Eli Crane <[email protected]>:
> > hello,
> > Thanks for the response.  I am not using Oracle, but it seems that we are
> > having very similar problems.  It seems that when NHibernate returns the
> > values it automatically tries to use a Decimal type instead of a Float
> type.
> >  Is there a way to force NHibernate to use a float on a field in a
> table?  I
> > have tried to set Type="float" in the mapping file, but that didn't help.
> > Thanks,
> > Eli
> >
> > On Thu, Nov 3, 2011 at 2:21 PM, Mirko Klupitz <[email protected]>
> wrote:
> >>
> >> are you using oracle?
> >> i had the same issue with oracle since the .net provider calls
> >> GetDecimal and should call GetOracleDecimal b/c a "oracledecimal" can
> >> be larger than the standard .net decimal.
> >>
> >> On 1 Nov., 14:37, Eli <[email protected]> wrote:
> >> > Hey guys,
> >> >
> >> > First of all, new member introduction.  I'm Eli, and am working on a
> >> > C# application to do spectrophotometry.  Hopefully someone might be
> >> > able to help with this problem.  Bare with me, I inherited this
> >> > NHibernate code from someone else, and am trying to learn it as fast
> >> > as I can.  Here goes...
> >> >
> >> > In a nutshell, I am using NHibernate to store data locally for a
> >> > desktop application.  Data is read from a USB device and then put into
> >> > the local Database.  This works fine.  The problem is that when I try
> >> > to read the data from the database I get an exception:
> >> >
> >> > NHibernate.Exceptions.GenericADOException{"could not initialize a
> >> > collection: "}  with an inner exception of : System.OverflowException
> >> > {"Value was either too large or too small for a Decimal."}
> >> >
> >> > The suspect value is in a StandardDeviation float that we successfully
> >> > put into the database, but it seems that it is too large to retrieve.
> >> > When I look at the Database using sqlite3 I see that the value of
> >> > StandardDeviation is 3.40282001837566e+38.
> >> >
> >> > Can anyone think of a reason why this would be allowable to be written
> >> > to the DB, but not readable?
> >> >
> >> > Thanks,
> >> >
> >> > Eli
> >>
> >> --
> >> 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.
> >>
> >
> > --
> > 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.
> >
>
> --
> 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.
>
>

-- 
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