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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.11
    • Fix Version/s: 2.0.12
    • Component/s: None
    • Labels:
      None
    • Environment:
      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

            Assignee:
            Lawrin Lawrin Novitsky
            Reporter:
            sujunmin Su, Jun-Ming
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration