Bug #72535 Writing record with ADO incomplete / wrong result (ODBC driver 5.02.06 32 bit)
Submitted: 4 May 2014 21:35 Modified: 17 May 2014 10:02
Reporter: Rene Roessler Email Updates:
Status: Verified 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
Running the code creates a recordset as following:

Input fields

SUserName := Admin
SUserPassword := Byte Array (8 Bytes)
SUserRights := ByteArray (6 Bytes)

Stored in database

SUserName  "" (empty string)
SUserPassword  Null (no Bytes)
SUserRights  ByteArray 6 Bytes (as expected)

Please tell me the reason for this. Wrong option flags?

I have used 16427
The recommended value of 3 (ADO, VB) doesn't work either.

Thanks for ideas to let it work :)

Cheers Rene

How to repeat:
CREATE TABLE `sce_usernames` (
  `SUsername` varchar(50) NOT NULL DEFAULT '',
  `SUserPassword` blob,
  `SUserRights` blob,
  PRIMARY KEY (`SUsername`),
  UNIQUE KEY `SUsername_UNIQUE` (`SUsername`)

Use this:

Typelib: Microsoft ActiveX Data Objects 6.1 (ADO 6.1)

    Dim Conn As ADODB.Connection, RS As ADODB.Recordset, BA() As Byte
    Set Conn = New ADODB.Connection
    Conn.ConnectionString = "DRIVER={MySQL ODBC 5.2 Unicode Driver};SERVER=localhost;DATABASE=sce;UID=...;PWD=...;Option=16427"
    If Conn.State = 1 Then
        Set RS = New Recordset
        RS.Open "SCE_USERNAMES", Conn, adOpenDynamic, adLockOptimistic
        If RS.State <> 0 Then
            RS.Fields("SUserName").Value = "Admin"
            BA = StrConv("Password", vbFromUnicode)
            RS.Fields("SUserPassword").Value = BA
            BA = StrConv("Rights", vbFromUnicode)
            RS.Fields("SUserRights").Value = BA
        End If
    End If
[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