Grace login error

Is there a way to get the grace login error (ora-28002: the password will expire within X days) without being asked if you want to change your password? I have TOracleLogon pointing to a TOracleSession with the TOracleSession.Options set to ldAuto.
 
To achieve this, you need to explicitly connect the TOracleSession if the username and password are known, instead of using ldAuto.

If the username and password are not know, call TOracleLogon.Execute.

------------------
Marco Kalter
Allround Automations
 
When I use TOracleSession only and set the username and password to explicitly connect I do not get the ora-28002 warning. When I use TOracleLogon (with ldAuto set to supress the login window) I get the warning, but it then pops up the change password window. How can I get the warning without being asked to change the password?
 
After calling TOracleSession.Logon (or setting Connected to True) you can inspect the ExpirationMessage property. If it is empty, logon was normal. If it contains a string, this is the actual expiration message from the Oracle Server.

------------------
Marco Kalter
Allround Automations
 
Back
Top