Utilizing the Password Expiration functionality using Microsofts OracleConnection

Connection string

This .NET Framework Data Provider for Oracle connection string can be used for connections to Oracle.

First open a connection with a connection string. When the connection is opened, an error is raised because the password have expired. Catch the error and execute the OpenWithNewPassword command supplying the new password.

Data Source=myOracleDB;User Id=myUsername;Password=myPassword;

oConn.OpenWithNewPassword(sTheNewPassword);