Thanks for the reply;
but as i am testing the BO layer, i can't set the max value *in* MySQL
(it would stop the whole point of testing it)
if there is no way of making a .Net function to prepare the double value so
certainly fit in the column, is there a way of stopping the warnings, so it
truncates the value silenty? (preferebly without switching STRICT off?)
thanks again guys,
From: Johan Steyn [mailto:jsteyn@stripped]
Sent: 19 February 2007 12:54
To: 'Chris Herridge'; dotnet@stripped
Subject: RE: MySQL not taking a Double.MaxValue
The declaration of a double is as follows:
DOUBLE(13,2) That gives the max length and precision of the field.
I don't know if this will help you in any way. So you set the max value for
the Double field in MySQl.
From: Chris Herridge [mailto:chris@stripped]
Sent: Monday, February 19, 2007 2:37 PM
Subject: MySQL not taking a Double.MaxValue
Just a quick question (I am busy writing unit tests for my Business Objects
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`
?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...)
?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?
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe: http://lists.mysql.com/dotnet?unsub=1