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

Strings right padded with NULL charcters in ADODB

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Windows Server 2008 R2
      IIS 7.5
      ASP Classic / ADODB

    Description

      VARCHAR column values are right padded with NULL charcters in ADODB.

      The SQL:
      select companyName from company where companyId = 1;

      In ASP Classic and ADODB the corresponding byte array of the results is (40 characters?):
      77 121 32 67 111 109 112 97 110 121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

      In .NET the string is correct:
      77 121 32 67 111 109 112 97 110 121

      The above byte array corresponds to "My Company".

      Table definition:
      CREATE TABLE `company` (
      `companyId` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
      `companyName` varchar(100) NOT NULL DEFAULT '',
      PRIMARY KEY (`companyId`),
      UNIQUE KEY `companyName` (`companyName`)
      ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

      Attachments

        Activity

          ulen Ulf Engstrand created issue -
          georg Georg Richter added a comment -

          Fixed in rev. 24

          georg Georg Richter added a comment - Fixed in rev. 24
          georg Georg Richter made changes -
          Field Original Value New Value
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow jira [ 41602 ] MariaDB connectors [ 69789 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB connectors [ 69789 ] MariaDB v3 [ 83997 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 83997 ] MariaDB v4 [ 135369 ]

          People

            georg Georg Richter
            ulen Ulf Engstrand
            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.