Ask the Expert

Code to check password and display user-defined message

When a particular user logs on to any schema, what code is to be written to check if the password is correct or wrong and display a user-defined message? I'm using Oracle version 8.x or 9.x and Developer 2000 Forms 6i version 5.0 or 6i.

    Requires Free Membership to View

When a user signs on to the database, they supply Oracle with the userid and password. Oracle uses these two values and a secret algorithm to compute a hash value. This hash value is compared with the hash value stored in the PASSWORD column in the DBA_USERS view for the given USERNAME. If the computed hash value matches the stored hash value, then the user must have given the correct userid/password combination. If the hash values do not match, Oracle returns the following error code and message:
ORA-01017: invalid username/password; logon denied
There is no way to tell Oracle to display any specific message. However, you can code your application to display any message you want if the ORA-1017 error is received.

This was first published in March 2006

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: