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

ServerVersion will not throw exception after connection is closed, and No any information is returned

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: ADONET-Aprium
    • Fix Version/s: ADO.NET 9.2.0.0001
    • Component/s: ADO.NET
    • Labels:
      None
    • Environment:

      Test build:9.1.0.0212
      Server OS: Linux 64bit

      Description

      According the to spec,we have:

      Gets a string that contains the version of the instance of SQL Server to which the client is connected.
      Namespace:  System.Data.SqlClient
      Assembly:  System.Data (in System.Data.dll)
      Syntax
      C#C++F#VB
      [BrowsableAttribute(false)]
      public override string ServerVersion { get; }
      Property Value
      Type: System.String
      The version of the instance of SQL Server.
      Exceptions
      Exception	Condition
      InvalidOperationException	
      The connection is closed.
      ServerVersion was called while the returned Task was not completed and the connection was not opened after a call to OpenAsync.
      

      so if connection is closed, exception should be returned.but currently, no exception is returned, and also no any value is ruturned

        Activity

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

        We have not implement the function

        Show
        cn15800 谢韦华[Bert] added a comment - We have not implement the function
        Hide
        cn15800 谢韦华[Bert] added a comment -

        after modify:

        Unhandled Exception: CUBRID.Data.CUBRIDClient.CUBRIDException: The connection is
        not open!

        Show
        cn15800 谢韦华[Bert] added a comment - after modify: Unhandled Exception: CUBRID.Data.CUBRIDClient.CUBRIDException: The connection is not open!
        Hide
        ryin005 Ray Yin added a comment -
        • Test OS: Win32
        • CUBRID: 9.2.0.0149
        • Driver: cubrid-ado.net 9.2.0.0001 (20130911)
        • Framework: .NET 4.0
        • Test Code
          CUBRIDConnection conn = new CUBRIDConnection();
          conn.ConnectionString = "server=xx.xx.xx.xx;database=demodb;port=33000;user=public;password=";
          
          LogTestStep("get ServerVersion when the connection is closed");
          try
          {
              serverVersion = conn.ServerVersion;
              LogStepFail();
          }
          catch (Exception ex)
          {
              Assert.AreEqual("The connection is not open!", ex.Message);
              LogStepPass();
          }
          

        Output: CUBRIDException "The connection is not open!"

        Test Result: Pass

        Close the issue

        Show
        ryin005 Ray Yin added a comment - Test OS: Win32 CUBRID: 9.2.0.0149 Driver: cubrid-ado.net 9.2.0.0001 (20130911) Framework: .NET 4.0 Test Code CUBRIDConnection conn = new CUBRIDConnection(); conn.ConnectionString = "server=xx.xx.xx.xx;database=demodb;port=33000;user=public;password="; LogTestStep("get ServerVersion when the connection is closed"); try { serverVersion = conn.ServerVersion; LogStepFail(); } catch (Exception ex) { Assert.AreEqual("The connection is not open!", ex.Message); LogStepPass(); } Output: CUBRIDException "The connection is not open!" Test Result: Pass Close the issue

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            sc14140 李应
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: