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

[ADO.NET]The OpenAsync function should returns an exception if the server connection is not started

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: ADO.NET 9.2.0.0002
    • Fix Version/s: ADO.NET 9.3.0.0002
    • Component/s: ADO.NET
    • Labels:
    • Environment:
      • Windows 32bit
      • CUBRID: 9.2.0.0155
      • Driver: cubrid-ado.net 9.2.0.0002 (2013-11-08)
      • Framework: .NET 3.5, .NET 4.0

      Description

      The OpenAsync will be always returned a state "connecting" even though the server connection is not started, it will cause an unstopped recursion if we use a while loop the OpenAsync() functions.

      such as:

      {code}
      CUBRIDConnection conn = new CUBRIDConnection();
      // the following connection is not started
      conn.ConnectionString = "server=localhost;database=demodb;port=33000;user=public;password=";

      try
      {
      conn.OpenAsync();
      Console.WriteLine(conn.State);
      }
      catch (Exception e)
      {
      Console.WriteLine(e.Message);
      }{code}

      Expectation: A exception should be thrown when we "connecting" the server for a long time

      PS: .NET3.5 and .NET4.0 do not support the OpenAsync() as described in the msdn document http://msdn.microsoft.com/en-us/library/System.Data.Common.DbConnection_methods(v=vs.90).aspx, we may remove this OpenAsync() function from the driver

        Activity

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

        We will remove the function

        Show
        cn15800 谢韦华[Bert] added a comment - We will remove the function

          People

          • Assignee:
            ryin005 Ray Yin
            Reporter:
            ryin005 Ray Yin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: