Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-155

CUBRID ODBC Driver에서 SELECT 수행시 런타임 오류 발생

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ODBC-Aprium
    • Component/s: ODBC
    • Labels:
      None
    • Environment:

      VB 6.0
      Client : Win XP SP3, Server : redhat 5.3 64bit
      CUBRID 2008 R4.0 (8.4.0.2027) (32bit release build for Windows_NT) (Oct 25 2011 16:23:30)
      CUBRID 2008 R4.1 (8.4.1.1018) (32bit release build for Windows_NT) (Feb 26 2012 13:06:24)

      Description

      1. ODBC 드라이브를 이용하여 샘플코드 작성 후 간단한 SELECT 쿼리 수행 첨부파일 캡처.PNG와 같이 런타임 오류 발생합니다.(쿼리 결과는 나옴)
      2. 테스트에 사용한 샘플코드는 첨부파일 sample.txt을 참조하시면 됩니다.
      3. www.cubrid.com의 Q&A에 올라온 게시글에서 발생한 문제입니다.(http://www.cubrid.com/zbxe/304370)

      1. sample.txt
        2 kB
        Kwon Seong Joon
      1. 캡처.PNG
        9 kB

        Issue Links

          Activity

          Hide
          hellohuizhang 张慧 added a comment -

          Hello!

          We have tested the sample you have given to us. However, there was no problem with it. Could you give us more detailed information about the scenario how you use ODBC?

          Thank you in advance!

          Show
          hellohuizhang 张慧 added a comment - Hello! We have tested the sample you have given to us. However, there was no problem with it. Could you give us more detailed information about the scenario how you use ODBC? Thank you in advance!
          Hide
          hellohuizhang 张慧 added a comment -

          We tested it on Windows x86 and CUBRID-8.4.0.2027.

          Show
          hellohuizhang 张慧 added a comment - We tested it on Windows x86 and CUBRID-8.4.0.2027.
          Hide
          hellohuizhang 张慧 added a comment -

          Hello!

          We have also test the sample on Windows-X86 and CUBRID-8.4.1.1018 and it could reproduce the problem.

          Now we know the reason why this problem happens. This situation has also happened on our PHP Driver and there has been an issue APIS-139. Please reference to it.

          Thank you!

          Show
          hellohuizhang 张慧 added a comment - Hello! We have also test the sample on Windows-X86 and CUBRID-8.4.1.1018 and it could reproduce the problem. Now we know the reason why this problem happens. This situation has also happened on our PHP Driver and there has been an issue APIS-139 . Please reference to it. Thank you!
          Hide
          ryin005 Ray Yin added a comment - - edited

          ODBC 9.1.0 (20130422-14175366) works correctly for this issue

          Test Cases:

           
          //APIS-155
          [Test, Description("Test APIs issue 155 on ODBC-9.1.0")]
          public void ReviewIssueTest_APIs155()
          {
              string strConn = @"Driver={CUBRID Driver};db_name=odbc_test;uid=dba;pwd=;server=10.34.64.57;port=33037;fetch_size=100;charset=UTF-8;";
              OdbcConnection connCubrid = new OdbcConnection(strConn);
              connCubrid.Open();
          
              string description = "abcd";
              string testTable = "test_apis155";
              string strCreateTable = string.Format("CREATE TABLE {0}(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, description STRING)", testTable);
              string strDropTable = string.Format("DROP TABLE {0}", testTable);
              string strSqlInsert = string.Format("INSERT INTO {0}(description) VALUE('{1}')", testTable, description);
              string strSqlInsert2 = string.Format("INSERT INTO {0}(description) VALUE('{1}')", testTable, description);
              string strSqlInsert3 = string.Format("INSERT INTO {0}(description) VALUE('{1}')", testTable, description);
          
              ExecuteMultiQueries(connCubrid, new string[] { strDropTable, strCreateTable, strSqlInsert, strSqlInsert2, strSqlInsert3 });
          
              string strSqlSelect = string.Format("SELECT * FROM {0};", testTable);
          
              OdbcCommand command = new OdbcCommand();
              command.Connection = connCubrid;
              command.CommandText = strSqlSelect;
          
              OdbcDataReader odbcReader = command.ExecuteReader();
              while (odbcReader.Read())
              {
                  Console.WriteLine(odbcReader.GetString(1));
                  Assert.AreEqual(description, odbcReader.GetString(1));
              }
          
              connCubrid.Close();
          }
          
          
          Show
          ryin005 Ray Yin added a comment - - edited ODBC 9.1.0 (20130422-14175366) works correctly for this issue Test Cases: //APIS-155 [Test, Description("Test APIs issue 155 on ODBC-9.1.0")] public void ReviewIssueTest_APIs155() { string strConn = @"Driver={CUBRID Driver};db_name=odbc_test;uid=dba;pwd=;server=10.34.64.57;port=33037;fetch_size=100;charset=UTF-8;"; OdbcConnection connCubrid = new OdbcConnection(strConn); connCubrid.Open(); string description = "abcd"; string testTable = "test_apis155"; string strCreateTable = string.Format("CREATE TABLE {0}(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, description STRING)", testTable); string strDropTable = string.Format("DROP TABLE {0}", testTable); string strSqlInsert = string.Format("INSERT INTO {0}(description) VALUE('{1}')", testTable, description); string strSqlInsert2 = string.Format("INSERT INTO {0}(description) VALUE('{1}')", testTable, description); string strSqlInsert3 = string.Format("INSERT INTO {0}(description) VALUE('{1}')", testTable, description); ExecuteMultiQueries(connCubrid, new string[] { strDropTable, strCreateTable, strSqlInsert, strSqlInsert2, strSqlInsert3 }); string strSqlSelect = string.Format("SELECT * FROM {0};", testTable); OdbcCommand command = new OdbcCommand(); command.Connection = connCubrid; command.CommandText = strSqlSelect; OdbcDataReader odbcReader = command.ExecuteReader(); while (odbcReader.Read()) { Console.WriteLine(odbcReader.GetString(1)); Assert.AreEqual(description, odbcReader.GetString(1)); } connCubrid.Close(); }

            People

            • Assignee:
              cn15163 杨伟为[Astro]
              Reporter:
              imjoony83 Kwon Seong Joon
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: