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

Application cannot set IPD's SQL_DESC_UNNAMED to SQL_UNNAMED

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      According to MSDN application has the right to do it. What is prohibited is to set that field to SQL_NAMED. The problem is more important than seems since that is one of things ADO does when uses parameters

      Attachments

        Activity

          The fix and the testcase have been pushed as rev#39.

          VB testcase would look something like
          Const DSN = "DSN=test"

          Const adParamInput = &H0001

          Const adCmdText = &H0001

          Const adVarChar=200

          Dim conn, rs, fld, cmd, pr

          Set conn = CreateObject("ADODB.Connection")

          conn.Open(DSN)

          Set cmd = CreateObject("ADODB.Command")
          cmd.ActiveConnection = conn
          cmd.CommandText = "SELECT b FROM t WHERE a=?"
          cmd.CommandType = adCmdText
          Set pr = CreateObject("ADODB.Parameter")
          'pr.Name = "a"
          pr.Type = adVarChar
          pr.Direction = adParamInput
          pr.Size = 10
          pr.Value = "u1"
          cmd.Parameters.Append(pr)

          Set rs = cmd.Execute()

          Lawrin Lawrin Novitsky added a comment - The fix and the testcase have been pushed as rev#39. VB testcase would look something like Const DSN = "DSN=test" Const adParamInput = &H0001 Const adCmdText = &H0001 Const adVarChar=200 Dim conn, rs, fld, cmd, pr Set conn = CreateObject("ADODB.Connection") conn.Open(DSN) Set cmd = CreateObject("ADODB.Command") cmd.ActiveConnection = conn cmd.CommandText = "SELECT b FROM t WHERE a=?" cmd.CommandType = adCmdText Set pr = CreateObject("ADODB.Parameter") 'pr.Name = "a" pr.Type = adVarChar pr.Direction = adParamInput pr.Size = 10 pr.Value = "u1" cmd.Parameters.Append(pr) Set rs = cmd.Execute()

          People

            Lawrin Lawrin Novitsky
            Lawrin Lawrin Novitsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.