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

Use recordset and return Invalid string or buffer length when the value is '' (not null)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 2.0.11
    • 2.0.12
    • None
    • None
    • Windows 2008 R2 64 bits, IIS 7.5, ASP Classic
      MariaDB 10.1.16

    Description

      There is a simple schema "test", and a table "testtable", and there is only column "testc" for char(10).

      There is only one row in test.testtable, and the value is '' (not null)

      when the asp use recordset to retrive the row for test,testtable,like this
      sql = "select testc from test.testtable"
      ds = conn.execute(sql)

      it always return
      [ma-2.0.11][mariadb-10.1.16] Invalid string or buffer length

      I need to change the sql statement to
      sql = "select (case testc when '' then NULL else testc end) as testc from test.testtable"
      ds = conn.execute(sql)

      It can be worked, why doesnt return '' for this case?

      Thanks.

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            sujunmin Su, Jun-Ming
            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.