Bug #72535 | Writing record with ADO incomplete / wrong result (ODBC driver 5.02.06 32 bit) | ||
---|---|---|---|
Submitted: | 4 May 2014 21:35 | Modified: | 23 Sep 5:16 |
Reporter: | Rene Roessler | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 5.2.6 | OS: | Windows (Microsoft Windows 7 Service Pack 1 build 7601, 64-bit) |
Assigned to: | Bogdan Degtyariov | CPU Architecture: | Any |
Tags: | ADO |
[4 May 2014 21:35]
Rene Roessler
[5 May 2014 13:35]
Bogdan Degtyariov
Hi Rene, Thanks for your interest in MySQL software. I have verified the bug as described. However, it cannot qualify as S1 bug because there are possible workarounds such as using VARCHAR column types instead of BLOB. This might be not convenient for your application logic, but still doable. Therefore I am changing the severity to S2.
[17 May 2014 10:02]
Rene Roessler
Hi, when do you think, the bug is fixed? One of our customers likes to use MySQL with our software. Cheers Rene
[23 Sep 5:16]
Bogdan Degtyariov
Posted by developer: With BLOB types ADO expects assignment of an array type. Strings will not work. Here is the relevant VB code: Sub bug_18709944() Dim con Set con = CreateObject("ADODB.Connection") con.Open "Driver={MySQL ODBC 9.0 Unicode Driver};" & _ "Server=localhost;Port=3306;" & _ "User=root;" & _ "Database=test;" con.Execute "DROP TABLE IF EXISTS sce_usernames" con.Execute "CREATE TABLE `sce_usernames` ( " & _ "`SUsername` varchar(50) NOT NULL DEFAULT ', " & _ "`SUserPassword` varchar(50), " & _ "`SUserRights` blob, " & _ "PRIMARY KEY (`SUsername`), " & _ "UNIQUE KEY `SUsername_UNIQUE` (`SUsername`) " & _ ")" Dim rs Set rs = CreateObject("ADODB.Recordset") rs.Open "SCE_USERNAMES", con, adOpenDynamic, adLockOptimistic If rs.State <> 0 Then rs.AddNew rs.Fields("SUserName").Value = "Admin" rs.Fields("SUserPassword").Value = "abc" Dim byteArr(10) As Byte byteArr(0) = CByte(Asc("A")) rs.Fields("SUserRights").Value = byteArr rs.Update rs.Close End If conn.Close End Sub The above code works. Closing the bug as "Could not reproduce" since it is working with ODBC Driver 9.0/9.1