OpenWithNewPasswordAsync(SecureString)

This method opens a new connection asynchronously with a new SecureString password.

Declaration

// C#
public Task OpenWithNewPasswordAsync(SecureString newSecurePassword);

Parameters

  • newSecurePassword

    A SecureString object that contains the new password for a user id.

Return Value

Task object representing the asynchronous operation immediately without blocking the calling thread for the whole duration of opening connection.

Exceptions

  • ArgumentNullException - newSecurePassword is NULL or is not read only.

  • InvalidOperationException - OracleCredential is not already set on the OracleConnection either through the OracleConnection constructor or through the Credential property of the OracleConnection.

  • InvalidOperationException - the OracleConnection is already in the open state.

  • InvalidOperationException - the connection string is NULL or of length 0.

  • InvalidOperationException - the user id, proxy user id, password, proxy password, DBA privilege is set using the connection string.

Remarks

Use this method to change the password for a user id. This method can only be used if an OracleCredential instance was passed using the OracleConnection constructor or through the OracleConnection Credential property.

This method will also update the password in the OracleCredential instance that was passed using the OracleConnection constructor or through the OracleConnection Credential property.

OracleCredential does not support double quotes around a SecureString password. However, double quotes can be used within a password.