Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-73

falscher Zeichensatz bei Recordsets mit DAO Object Library

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.0.12, 2.0.13
    • 2.0.14, 3.0.1
    • None
    • None
    • MariaDB 10.1.16, Charset uft8, Access 2010/2016, DAO 3.6, VBA

    Description

      VBA: Recordset.Fields() ... liefert falsche Zeichensätze von Textfeldern zurück und verursacht in Folge Datentyp-Fehler
      Der Tabellenzugriff auf die MariaDB-Datenbank mit dem mySQL-ODBC-Treiber 5.3.4 (32bit) klappt ohne Probleme und liefert die richtigen Rückgabewerte.

      Attachments

        1. maodbc.dll
          1.43 MB
        2. MariaDB_ODBC_ADO.pdf
          170 kB
        3. tbl_adressen.jpg
          tbl_adressen.jpg
          137 kB
        4. tbl_adressen.pdf
          114 kB

        Activity

          So, they were utf8_bin? And you've altered the table and removed utf8_bin? jpg is "before" and pdf is "after"? Did that help?

          If did not, please provide "show create table adressen" result, so I could test what is wrong with the table.
          Otherwise I am closing the issue.

          Lawrin Lawrin Novitsky added a comment - So, they were utf8_bin? And you've altered the table and removed utf8_bin? jpg is "before" and pdf is "after"? Did that help? If did not, please provide "show create table adressen" result, so I could test what is wrong with the table. Otherwise I am closing the issue.
          Wassermann Kurt Pfleger added a comment -

          I haven´t altered the tables. Here the create statement:

          CREATE TABLE `adressen` (
          `NUMMER` smallint(6) NOT NULL,
          `VORNAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `ZUNAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
          `VOLLMACHT` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `STRASSE` varchar(35) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `PLZ` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `ORT` varchar(25) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `BANK` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'Land',
          `TELEFON` varchar(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `EMAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `UID` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `USER` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
          `TS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY (`NUMMER`) USING BTREE
          ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
          /*!40101 SET character_set_client = @saved_cs_client */;

          Wassermann Kurt Pfleger added a comment - I haven´t altered the tables. Here the create statement: CREATE TABLE `adressen` ( `NUMMER` smallint(6) NOT NULL, `VORNAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `ZUNAME` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `VOLLMACHT` varchar(40) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `STRASSE` varchar(35) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `PLZ` varchar(7) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `ORT` varchar(25) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `BANK` varchar(30) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'Land', `TELEFON` varchar(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `EMAIL` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `UID` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `USER` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `TS` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`NUMMER`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; /*!40101 SET character_set_client = @saved_cs_client */;

          I am not sure there is a bug here. Server reports binary flag for fields, thus connector report to dao that fields are binary, dao fetches values as binary.
          On other hand, if someone chooses utf8_bin collation for his/her utf8 field, unlikely he/she expects it to be treated as a binary field. And maybe connector should not trust server, and check some other conditions, to establish the fact whether the field is binary or not. I will think some more on this.

          Does that table have utf8_bin collation intentionally? To change to other collation would be one work-around for your problem. Other work-around to view those fields correctly, probably, would be to use convert/cast functions for those fields.

          Lawrin Lawrin Novitsky added a comment - I am not sure there is a bug here. Server reports binary flag for fields, thus connector report to dao that fields are binary, dao fetches values as binary. On other hand, if someone chooses utf8_bin collation for his/her utf8 field, unlikely he/she expects it to be treated as a binary field. And maybe connector should not trust server, and check some other conditions, to establish the fact whether the field is binary or not. I will think some more on this. Does that table have utf8_bin collation intentionally? To change to other collation would be one work-around for your problem. Other work-around to view those fields correctly, probably, would be to use convert/cast functions for those fields.

          The fix has been pushed (to 2.0 branch) as rev. b0e0d7c2a489dd4436256a7f8bb644f6641fa8ad

          Lawrin Lawrin Novitsky added a comment - The fix has been pushed (to 2.0 branch) as rev. b0e0d7c2a489dd4436256a7f8bb644f6641fa8ad
          Lawrin Lawrin Novitsky added a comment - - edited

          I've decided that is a bug And fixed. If you care to verify it - I have attached the dll with it. That is not any official release, and good only for testing/verification.
          And thanks once again - you were really helpful!

          Lawrin Lawrin Novitsky added a comment - - edited I've decided that is a bug And fixed. If you care to verify it - I have attached the dll with it. That is not any official release, and good only for testing/verification. And thanks once again - you were really helpful!

          People

            Lawrin Lawrin Novitsky
            Wassermann Kurt Pfleger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.