20 messages in com.mysql.lists.dotnetRE: MySQL not taking a Double.MaxValue| From | Sent On | Attachments |
|---|---|---|
| Reggie Burnett | 25 Oct 2006 12:58 | |
| David Dindorp | 26 Oct 2006 02:25 | |
| Martin MC Brown | 26 Oct 2006 06:09 | |
| David Dindorp | 26 Oct 2006 06:42 | |
| Reggie Burnett | 26 Oct 2006 07:33 | |
| David Dindorp | 26 Oct 2006 07:44 | |
| Reggie Burnett | 26 Oct 2006 08:04 | |
| David Dindorp | 27 Oct 2006 02:40 | |
| Barry Zubel | 27 Oct 2006 02:54 | |
| Yvan Rodrigues | 27 Oct 2006 07:23 | |
| David Dindorp | 27 Oct 2006 08:32 | |
| Reggie Burnett | 27 Oct 2006 13:54 | |
| David Dindorp | 28 Oct 2006 14:26 | |
| Reggie Burnett | 28 Oct 2006 17:23 | |
| David Dindorp | 09 Nov 2006 05:19 | |
| Reggie Burnett | 15 Nov 2006 08:02 | |
| Chris Herridge | 19 Feb 2007 04:36 | |
| Johan Steyn | 19 Feb 2007 04:53 | |
| Chris Herridge | 19 Feb 2007 05:05 | |
| Reggie Burnett | 21 Feb 2007 08:24 |
| Subject: | RE: MySQL not taking a Double.MaxValue![]() |
|---|---|
| From: | Chris Herridge (chr...@herridge.co.uk) |
| Date: | 02/19/2007 05:05:42 AM |
| List: | com.mysql.lists.dotnet |
Hi,
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 it will 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, Chris.
-----Original Message----- From: Johan Steyn [mailto:jst...@nics.co.za] Sent: 19 February 2007 12:54 To: 'Chris Herridge'; dot...@lists.mysql.com Subject: RE: MySQL not taking a Double.MaxValue
Hi There,
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.
Johan.
-----Original Message----- From: Chris Herridge [mailto:chr...@herridge.co.uk] Sent: Monday, February 19, 2007 2:37 PM To: dot...@lists.mysql.com Subject: MySQL not taking a Double.MaxValue
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.
-- MySQL on .NET Mailing List For list archives: http://lists.mysql.com/dotnet To unsubscribe: http://lists.mysql.com/dotnet?unsub=jst...@nics.co.za




