Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.2.4
    • 3.2.5
    • General
    • None
    • Windows server

    Description

      In ODBC connector version 3.2.4 milliseconds are truncated from datetime values, in version 3.1.20 it works ok...

      To reproduce (save code to vbs file):

      'hack to get milliseconds from date value - vbscript itself is not able to handle it
      function MS(d)
      dim col, ScriptControl
      set ScriptControl = Createobject("ScriptControl")
      ScriptControl.Language = "JSCript"
      set col = CreateObject("Scripting.Dictionary")
      col("date")=d
      ScriptControl.AddObject "col", col
      ScriptControl.executestatement("d=col(""date"");d=new Date(d);")
      MS = ScriptControl.eval("d.getMilliseconds()")
      set ScriptControl = nothing
      end function

      set conn=CreateObject("ADODB.Connection")
      conn.open("DRIVER=

      {MariaDB ODBC 3.2 Driver}

      ;SERVER=...;DATABASE=...;UID=...;PWD=...; OPTION=3;")
      conn.execute "create table test (d datetime(3))"
      conn.execute "insert into test values('2025-01-01 12:00:00.123')"
      set rs=conn.execute("select d from test")
      MsgBox MS(rs("d"))
      rs.close
      set rs=nothing
      conn.execute "drop table test"
      conn.close
      set conn=nothing

      It is expected to alert "123" (works ok in 3.1.20) but in 3.2.4 alerts "0"

      Attachments

        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.