[ODBC-108] ado.addnew/ODBC: Error with Decimal datatype Created: 2017-08-24  Updated: 2022-07-18  Resolved: 2022-07-18

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: 2.0.15
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Ph. Baumgartner Assignee: Lawrin Novitsky
Resolution: Incomplete Votes: 0
Labels: ado, odbc
Environment:

MariaDB 10.2.7, Win7, ADO-DB-Layer


Attachments: Text File ODBC_Test_Datatypes.txt     Text File SQL - MariaDB.LOG     Text File SQL - MySQL.LOG     Text File SQL.LOG    
Issue Links:
Relates
relates to ODBC-71 ado .addnew function creates error Closed

 Description   

I am still testing the ODBC Driver for an application migration.

When trying to add a record with integer and char datatypes, ADO performs without an error. When I add a DECIMAL datatype, ODBC raises an error:

Valuation and B 2124-1e4c ENTER SQLGetDiagRecW
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x00932AB0
SQLSMALLINT 1
SQLWCHAR * 0x0018D590
SQLINTEGER * 0x0018D188
SQLWCHAR * 0x0018D190
SQLSMALLINT 512
SQLSMALLINT * 0x0018D184

Valuation and B 2124-1e4c EXIT SQLGetDiagRecW with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 0x00932AB0
SQLSMALLINT 1
SQLWCHAR * 0x0018D590 [ 5] "22002"
SQLINTEGER * 0x0018D188 (0)
SQLWCHAR * 0x0018D190 [ 71] "[ma-2.0.15][10.2.7-MariaDB]Indicator variable required but not supplied"
SQLSMALLINT 512
SQLSMALLINT * 0x0018D184 (71)

Seems to me the same as the previous .addnew error.

I will attach the ODBC Tracefile of my test.



 Comments   
Comment by Lawrin Novitsky [ 2017-09-13 ]

JFYI, I could not repeat this your issue either.

I will try to figure out smth based on your trace file.

btw, what VS version are you using?

Comment by Ph. Baumgartner [ 2017-09-19 ]

I am using VB version 6 and ADO 2.8. The version for the ADO component is the same on win7 and win10.

I will attach the script I used, the sql log for the Mariadb odbc driver and the MySQL ODBC driver.
As you can see does it work with the later.
With MariaDB ODBC driver it throws an exception when executing the .addnew function when the db table contains a decimal field.

Comment by Ph. Baumgartner [ 2017-09-19 ]

I had to add the attachments seperately otherwise Jira is complaining about a missing token....

ODBC_Test_Datatypes.txt SQL - MySQL.LOG SQL - MariaDB.LOG

Comment by Lawrin Novitsky [ 2018-06-04 ]

Recently I have fixed some bugs concerning decimal type and ADO(e.g ODBC-146). I can't say their description allows me to say they are the same as yours, but I think there are good chances, that yours has been fixed by those patches as well. Would be great if you could test with new coming release(3.0.5 or 2.0.17). Or I could provide unofficial build to try now.

Comment by Ralf Gebhardt [ 2022-07-18 ]

Closed this issue as incomplete since it for a long time has been waiting for feedback.

Generated at Thu Feb 08 03:26:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.