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

[OLEDB] OLEDB connection is failed when the connection string contains an empty 'Password'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: OLEDB-9.2.0.0001
    • Fix Version/s: OLEDB-9.2.0.0001
    • Component/s: OLEDB
    • Labels:
    • Environment:
      • OS: Windows 7 32 bit
      • CUBRID: 9.2.0.0111
      • OLEDB: cubrid-oledb 9.2.0 (2013-07-25)
      • .NET 4.0 framework, VS 2010

      Description

      • Brief: The OLEDB will be failed is the connection string contains an empty 'Password'
      • Test Code {code}
        string strConn = @"Provider=CUBRID OLE DB Provider;Data Source=test_oledb;Location=10.34.64.57;User ID=dba;Password=;Port=33059;Charset=utf-8;";

        OleDbConnection connCubrid = new OleDbConnection();
        connCubrid.ConnectionString = strConn;

        connCubrid.Open();
        Console.WriteLine(connCubrid.State);

        connCubrid.Close();{code}

      Expected Result:

      The connection is opened
      

      Actual Result:

      System.Data.OleDb.OleDbException : 没有可用的错误消息,结果代码: DB_SEC_E_AUTH_FAILED(0x80040E4D)。
      

      PS: If we change the connection string as below (i.e. use single quote or remove Password), the case will be passed
      1) Provider=CUBRID OLE DB Provider;Data Source=test_oledb;Location=10.34.64.57;User ID=dba;Password='';Port=33059;Charset=utf-8;
      2) Provider=CUBRID OLE DB Provider;Data Source=test_oledb;Location=10.34.64.57;User ID=dba;Port=33059;Charset=utf-8;

      Summary: according to the document http://www.cubrid.org/wiki_apis/entry/cubrid-oledb-driver-installation-instructions-new, the empty Password could be included in the oledb connection string, but it now throws an exception

      PS: if the empty Password is not allowed to be included in the connection string anymore (i.e. the spec is changed), we need to update the document relevantly

        Activity

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

        I have test Password='',Password= and not set password, application can connect cubrid successful.

        I think there is another connection problem when password is empty.

        Show
        cn15800 谢韦华[Bert] added a comment - - edited I have test Password='',Password= and not set password, application can connect cubrid successful. I think there is another connection problem when password is empty.
        Hide
        cn15800 谢韦华[Bert] added a comment -

        Please test the issue with new driver, it will tell you the cause of connction error.

        Many environments work successful when password is empty(Password=).

        So this is not a bug.

        Show
        cn15800 谢韦华[Bert] added a comment - Please test the issue with new driver, it will tell you the cause of connction error. Many environments work successful when password is empty(Password=). So this is not a bug.
        Hide
        ryin005 Ray Yin added a comment -

        The case is passed on WinXP 32bit, but throws an exception 'System.Data.OleDb.OleDbException : Incorrect or missing password.' on Win7 32 bit.

        We could modify the document http://www.cubrid.org/wiki_apis/entry/cubrid-oledb-driver-installation-instructions-new to change the connection string to

        Provider=CUBRID OLE DB Provider;Data Source=test_oledb;Location=10.34.64.57;User ID=dba;Password='';Port=33059;Charset=utf-8;

        Because Password='' will be never failed in any machine

        Show
        ryin005 Ray Yin added a comment - The case is passed on WinXP 32bit, but throws an exception 'System.Data.OleDb.OleDbException : Incorrect or missing password.' on Win7 32 bit. We could modify the document http://www.cubrid.org/wiki_apis/entry/cubrid-oledb-driver-installation-instructions-new to change the connection string to Provider=CUBRID OLE DB Provider;Data Source=test_oledb;Location=10.34.64.57;User ID=dba; Password=''; Port=33059;Charset=utf-8; Because Password='' will be never failed in any machine
        Hide
        cn15800 谢韦华[Bert] added a comment -

        fixed

        Show
        cn15800 谢韦华[Bert] added a comment - fixed
        Hide
        ryin005 Ray Yin added a comment -

        The document has been updated

        Close the issue

        Show
        ryin005 Ray Yin added a comment - The document has been updated 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: