OpenWithNewPasswordAsync(SecureString, CancellationToken)
This method opens a new connection asynchronously with a new SecureString
password and token that can cancel the task.
Declaration
// C# public Task OpenWithNewPasswordAsync(SecureString newSecurePassword, CancellationToken cancellationToken);
Parameters
-
newSecurePassword
A
SecureString
object that contains the new password for a user id. -
cancellationToken
The input cancellation token which can be used by the application to cancel the task before connection timeout occurs.
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 theOracleConnection
either through theOracleConnection
constructor or through theCredential
property of theOracleConnection
. -
InvalidOperationException - the
OracleConnection
is already in the open state. -
InvalidOperationException - the connection string is
NULL
or of length0
. -
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.