OracleCredential(string, SecureString)

This constructor creates an OracleCredential object with the user id and the secured password.

Declaration

// C#
public OracleCredential(string userId, SecureString password)

Exceptions

  • ArgumentNullException is raised if any parameters are passed as null.

  • ArgumentException is raised if “/” is passed for userId argument.

  • ArgumentException is raised if the SecureString containing the password is not read-only.

  • InvalidOperationException is raised when OracleCredential object is used with any of user id, password, proxy user id, proxy password and/or dba privilegeconnection string attribute(s) present in the connection string.

Remarks

With this constructor, OracleDBAPrivilege.None is used for the DBA privilege when requesting for a connection.