0

I constructed a MySqlParameter with MySqlParameter tmp1 = new MySqlParameter("?tmp1", 0.0); and when executing the corresponding insert query received the error message that the respective column cannot be null.

When investigating that parameter in Visual Studio's debugger, its Value property is shown as null, though I think that 0.0 and nullare different things.

Anyway, when I set the value later on with tmp1.Value = 0.0;, the parameter's value is correctly shown as 0. (Note: different values like 1 work correctly in the constructor).

Is that a feature of the constructor of MySqlParameter (MySql.Data.6.9.8, net45) or a bug?

Dharman
  • 30,962
  • 25
  • 85
  • 135
Bernhard Hiller
  • 2,163
  • 2
  • 18
  • 33

1 Answers1

0

It is a known bug:

https://bugs.mysql.com/bug.php?id=85027

but comments on that page indicate that some people think of it as a feature...

Bernhard Hiller
  • 2,163
  • 2
  • 18
  • 33