List:MySQL and .NET« Previous MessageNext Message »
From:Chris Herridge Date:February 19 2007 12:37pm
Subject:MySQL not taking a Double.MaxValue
View as plain text  
Hi guys;

Just a quick question (I am busy writing unit tests for my Business Objects
system)
I've got a simple object that stores every CLR type and I'm going thru
testing it's min/max values;

so for example; (pseudo code)

INSERT INTO `TESTA`
(`boolean`,`byte`,`sbyte`,`char`,`decimal`,`double`,`enumdayofweek`,`float`,
`int16`,`int32`,`int64`,`uint16`,`uint32`,`uint64`,`texta`,`textb`,`textc`,`
textd`,`texte`)
VALUES
(?boolean,?byte,?sbyte,?char,?decimal,?double,?enumdayofweek,?float,?int16,?
int32,?int64,?uint16,?uint32,?uint64,?texta,?textb,?textc,?textd,?texte)


where
?double = Double.MaxValue;
it tells me it doesn't fit...

"Out of range value adjusted for column 'double' at row 1"

I've also tried;

?double = Double.Parse(Double.MaxValue.ToString("R"));
(I know that looks really quite stupid; but...)

also tried;

?double = Double.MaxValue-Double.Epsilon
(no luck there)


is there any logical method for fitting a Double into MySql
I'm using connector 5.0.3
and mysql 5.0.27 (community max nt)


or should I just lump it and store it as a string using .Tostring("R")
(which I really don't want to do!)

Can MySQL hold Double set to (+/-) Infinity too?


will i get exactly the same set of problesm with (Float/Single) too?


Thanks,
Chris Herridge.


Thread
New bugs category for Visual Studio pluginReggie Burnett25 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp26 Oct
  • Re: New bugs category for Visual Studio pluginMartin MC Brown26 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp26 Oct
  • RE: New bugs category for Visual Studio pluginReggie Burnett26 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp26 Oct
  • RE: New bugs category for Visual Studio pluginReggie Burnett26 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp27 Oct
  • Re: New bugs category for Visual Studio pluginBarry Zubel27 Oct
  • RE: New bugs category for Visual Studio pluginReggie Burnett27 Oct
    • MySQL not taking a Double.MaxValueChris Herridge19 Feb
      • RE: MySQL not taking a Double.MaxValueJohan Steyn19 Feb
      • RE: MySQL not taking a Double.MaxValueReggie Burnett21 Feb
RE: New bugs category for Visual Studio pluginYvan Rodrigues27 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp27 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp28 Oct
  • RE: New bugs category for Visual Studio pluginReggie Burnett29 Oct
RE: New bugs category for Visual Studio pluginDavid Dindorp9 Nov
  • RE: New bugs category for Visual Studio pluginReggie Burnett15 Nov
RE: MySQL not taking a Double.MaxValueChris Herridge19 Feb