Bug #72541 Error for fetching a decimal value from a variable
Submitted: 5 May 2014 23:37 Modified: 14 Dec 2023 7:42
Reporter: Rafael Caesar Lenzi Email Updates:
Status: Can't repeat Impact on me:
Category:Connector / ODBC Severity:S2 (Serious)
Version:>=5.2.6, 8.0 OS: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.

[30 Nov 2023 13:27] MySQL Verification Team
Bug #113285 marked as duplicate of this one.
[14 Dec 2023 7:42] Bogdan Degtyariov
Posted by developer:
This issue is no longer repeatable with MySQL ODBC Driver 8.0/8.1/8.2 and 8.3
Closing the ticket.