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

Strings right padded with NULL charcters in ADODB

    XMLWordPrintable

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

          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.