Bug #72541 Error for fetching a decimal value from a variable
Submitted: 5 May 2014 23:37 Modified: 6 May 2014 12:10
Reporter: Rafael Caesar Lenzi Email Updates:
Status: Verified Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:>=5.2.6 OS:Microsoft Windows
Assigned to: Assigned Account CPU Architecture:Any

[5 May 2014 23:37] Rafael Caesar Lenzi
When trying get a decimal value from a variable, the adodb return the error 80040e21.

It dont happen with mysql-odbc-connection 3.51.12, but this odbc version lost connection when use stored procedures.

PS: Sorry for my bad english

How to repeat:
mysql> SELECT 12 INTO @z;
Query OK, 1 row affected (0.00 sec)

mysql> SELECT @z;
| @z   |
|   12 |
1 row in set (0.00 sec)

mysql> SELECT CAST(12.1 AS DECIMAL(10, 4)) INTO @z;
Query OK, 1 row affected (0.00 sec)

mysql> SELECT @z;
ADODB ERROR - Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. (80040e21)
[5 May 2014 23:39] Rafael Caesar Lenzi
MySQL test3.xls

Attachment: MySQL test3.xls (application/vnd.ms-excel, text), 36.00 KiB.

[6 May 2014 12:10] MySQL Verification Team
Thank you for the bug report. Verified as described.
[16 Sep 2014 15:51] Hemant Dangi
Hello Rafael,

Thanks for showing interest in MySQL Connector/ODBC.

I am taking this as a bug in MyODBC and will try to resolve asap, so meanwhile you can use below workaround.

myCommand.CommandText = "SELECT  Convert(CAST(12.1 AS DECIMAL(10, 4)), Char) INTO @z;"

And I am downgrading its severity to S2, as workarounds are there and its not complete loss of service.