Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Log on screen in Oracle forms 2

Status
Not open for further replies.

jhoann

Programmer
Apr 18, 2002
81
PH
Hi,

I don't want to use the log-on screen (built-in) from oracle... what I want is to make a new screen that will show before they start the system instead of the built-in, where the user can input their username, password and the connect string.
I want the username textbox to have an LOV so that they can just choose the username from the LOV.

Is there someone knows how to do it?

thanks in advance.
 
You have to reprogram the ON-LOGON trigger. In it would be code like this

IF :block.username IS NOT NULL
AND :block.password IS NOT NULL
AND :block.sid IS NOT NULL
THEN
Logon:)block.username,:block.password || '@' || :block.sid,FALSE);
END IF;

Then in a logon screen that you create on a canvas in the form will have a button to connect, and the button will have the code

Logout;
Logon(Null,Null,FALSE);
 
thank you for your time.

(1)
but my problem is my lov didn't work.
for example on my log-on screen i have the following text box:
--> LOGON SCREEN
Username : (then I have an LOV here)
Password :
Connect string :

when the system starts , it will show the LOGON SCREEN:
but when i press the LOV there's an error
"FRM-40502 oracle error: unable to read list of values."

What will I do????

(2)
I typed the code that you gave me... it didn't work in my program ... when I press the connect button , it didn't connect ...:c
Please help me....


Hoping for your help!!!

Jhoann
 
If you want an LOV to read a list from the database first it will have to connect as an anonymous user.

You can check for successful logon by checking FORM_SUCCESS immediatley after the Logon call in the ON-LOGON trigger. If it fails then check the DBMS_ERROR_MESSAGE to see what went wrong.
 
hi lewisp,

If you want an LOV to read a list from the database first it will have to connect as an anonymous user. ....

HOW WILL I DO THIS? I'M REALLY SORRY I'M NEW TO THIS KIND OF PROGRAM :C


PLEASE HELP ... THANKS A LOT!!!

jhoann
 
Your form will need to connect to the database as a user known only to you. You can do this in the ON-LOGON trigger by either hard coding or using parameters. If you use parameters your ON-LOGON might look something like this

IF :parameter.username IS NOT NULL
THEN
logon:)parameter.username,:parameter.password || '@' || :parameter.sid);
:parameter.username := NULL;
ELSE
Logon:)block.username,:block.password || '@' || :block.sid,FALSE);
END IF;

The form will connect as the user defined in your parameters and you can build the user list in your form. Once the user has chosen a username to log in with use logon(null,null); as I showed above to log on as the new user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top