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

Wrong decimal value (0) when after longtext field in select clausule (using ADO, client side cursor)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.0.3
    • 2.0.17, 3.0.5
    • General
    • None
    • Windows server 2012 R2

    Description

      ODBC connector 3.0.3 returns always value 0 for decimal fields when accessed via ADODB with clientside cursor when decimal field is after longtext field in select clausule .e.g:

      vb6 code
      set conn = new ADODB.Connection
      set rs = new ADODB.Recordset
      rs.CursorLocation = adUseClient
      conn.Open "DRIVER=

      {MariaDB ODBC 3.0 Driver}

      ;SERVER=...;DATABASE=...;UID=...;PWD=...; OPTION=3;"
      conn.execute "create table aaa(nm_price decimal(20,4), m_comment longtext)"
      conn.execute "insert into aaa values(123.45, 'xxx')"
      rs.Open "SELECT m_comment, nm_price from aaa", conn, adOpenForwardOnly, adLockReadOnly
      MsgBox rs.Collect("nm_price") ' = 0 - ERROR
      rs.Close
      rs.Open "SELECT nm_price from aaa", conn, adOpenForwardOnly, adLockReadOnly
      MsgBox rs.Collect("nm_price") ' = 123.45 - OK
      rs.Close
      set rs=nothing
      conn.execute "drop table aaa"
      conn.Close
      set conn = nothing

      Attachments

        1. mdb.vbs
          0.6 kB
          Marek Šrom
        2. SQL.LOG
          100 kB
          Marek Šrom

        Activity

          People

            Lawrin Lawrin Novitsky
            marek.srom Marek Šrom
            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.