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

SQL statements will be missed some parts and causes the query failed

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 1.0.6
    • 3.0.0, 2.0.13
    • None
    • None
    • Windows 2008 R2 64 bits, IIS 7.5, ASP Classic
      MariaDB 10.1.16

    Description

      There is a simple schema 'test', a table 'test1', a column 'test1c' for char(10).

      There is one record '123' in 'test'.'test1'

      use ADODB RecordSet to retrieve data.

      set a = "123"
      sql = "select test1c from test.test1 where test1c = '" & a & "';"
      rs = conn.execute(sql)

      it will produce the error 'near testc = '123 error'

      and if I debug for this problem by use response.write, the strange output occurs.

      set a = "123"
      sql = "select test1c from test.test1 where test1c = '" & a & "';"
      response.write sql
      rs = conn.execute(sql)

      the result is

      select test1c from test.tesmt1 where test1c = '123
      (the following is error message for lacking the last part of sql statements)

      once I add response.end after response.write sql, the result is the same.

      set a = "123"
      sql = "select test1c from test.test1 where test1c = '" & a & "';"
      response.write sql
      response.end
      rs = conn.execute(sql)

      and the last time I comment out the rs, and sql statements will be fine.

      set a ="'123"
      sql = "select test1c from test.test1 where test1c = '" & a & "';"
      response.write sql
      response.end
      //rs = conn.execute(sql)

      select test1c from test.test1 where tect1c = '123';

      why is the rs affect the sql statements?

      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.