Bug #11550 Adding decimal parameters problem
Submitted: 24 Jun 2005 17:29 Modified: 25 Jun 2005 18:42
Reporter: Mircea Mircovici Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:mysql 5.07 / .Net C 1.04 OS:Windows (Windows XP SP2)
Assigned to: Reggie Burnett CPU Architecture:Any

[24 Jun 2005 17:29] Mircea Mircovici
Description:
When I try to use parametrized insert commands like "Insert into mytable ... Values(?a,?b,?c)" I get an error for the non-string parameters added with "cmd.Parameters.Add("?a",(decimal) 2.4)" for example. The error is a standard syntax error and the command string it refers to has the right decimal numbers but also some odd square-like characters [] (you know!). 
  If I transform my decimals into strings it works just fine but I need it to work my way because i use Globalization settings and ToString() just messes things up. This is urgent and I can't fix it. Please help. Thnak you!

How to repeat:
.NET Connector 1.04
INSERT command with DECIMAL PARAMETERS generates syntax error

Suggested fix:
If I only knew.
[24 Jun 2005 20:45] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Bug #11550  	Adding decimal parameters problem [fixed]

fixed in 1.0.5
[25 Jun 2005 18:42] Mike Hillyer
Documented in 1.0.5 changelog.