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

[ADO.NET] CUBRIDDataReader doesn't support multiple queries

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: ADO.NET 9.2.0.0001
    • Fix Version/s: ADO.NET 9.2.0.0002
    • Component/s: ADO.NET
    • Labels:
    • Environment:
      • OS: Win32
      • CUBRID: 9.2.0.0149
      • Driver: cubrid-ado.net 9.2.0.0001 (20130911)
      • Framework: .NET 4.0

      Description

      • Brief: CUBRIDDataReader doesn't support multiple queries, we can not use CUBRIDDataReader to retrive multiple dataset
      • Test Code

      Case 1

      string conn_string = "server=xx.xx.xx.xx;database=demodb;port=33000;user=dba;password=";
      CUBRIDConnection conn = new CUBRIDConnection();
      conn.ConnectionString = conn_string;
      conn.Open();
      
      String sql = "select s_name from code where f_name = 'Mixed'; select s_name from code where f_name = 'Woman';";
      CUBRIDCommand cmd = new CUBRIDCommand(sql, conn);
      
      CUBRIDDataReader reader = (CUBRIDDataReader)cmd.ExecuteReader();
      while (reader.Read())
      {
          Console.WriteLine(reader.GetString(0));
      };
      
      conn.Close();
      

      Expect Result:

      X
      W
      

      Actual Result:

      CUBRID.Data.CUBRIDClient.CUBRIDException: Invalid buffer position!
      

      Case 2:

      string conn_string = "server=xx.xx.xx.xx;database=demodb;port=33000;user=dba;password=";
      CUBRIDConnection conn = new CUBRIDConnection();
      conn.ConnectionString = conn_string;
      conn.Open();
      
      String sql = "select count(*) from code; select count(*) from nation;";
      CUBRIDCommand cmd = new CUBRIDCommand(sql, conn);
      
      CUBRIDDataReader reader = (CUBRIDDataReader)cmd.ExecuteReader();
      while (reader.Read())
      {
          Console.WriteLine(reader.GetInt(0));
      }
      
      conn.Close();
      

      Expected Result:

      6
      215
      

      Actual Result:

      157511541
      

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        This is new feature,it is same with APIS-378, maybe we can fixed in next version.

        Show
        cn15800 谢韦华[Bert] added a comment - This is new feature,it is same with APIS-378 , maybe we can fixed in next version.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        fixed, it is same with 378

        Show
        cn15800 谢韦华[Bert] added a comment - fixed, it is same with 378
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Win 32/64
        • CUBRID: 9.2.0.0155
        • Driver: cubrid-ado.net 2013-11-08
        • Framework: .NET3.5/.NET4.0

        Test Result: Pass

        Close the issue

        Show
        ryin005 Ray Yin added a comment - Test OS: Win 32/64 CUBRID: 9.2.0.0155 Driver: cubrid-ado.net 2013-11-08 Framework: .NET3.5/.NET4.0 Test Result: Pass Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            ryin005 Ray Yin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: