Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

creating a log-in screen in oracle forms 9i

Posted on 2005-03-16
8
Medium Priority
?
4,923 Views
Last Modified: 2013-12-01
Hi,

I have not had much experience in developing forms in oracle and wondered if anyone could advise me on how to create a log-on screen for a set of users to be able to put their username and passwords access the main page of my solution.  
Is there a built-in facility in oracle forms itself, do I have to create a table with names and passwords and just build a form which acts a log-on screen?

Can anyone help please.
thanks
cassiusduke
0
Comment
Question by:cassiusduke
7 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 13562474
You can use default Forms logon screen. It is displayed automatically when a user is not connected to the database or you can invoke it by using LOGON_SCREEN.
You can also built your own logon screen - see LOGON_SCREEN, LOGON, LOGOUT built-ins with examples in the on-line help. There is no need of building the table with names and passwords as you will see in the examples.
0
 
LVL 13

Expert Comment

by:bochgoch
ID: 13563007
Depends to a degree what you want to do with security....

If you need to set up types of users with differing access to parts of your application (i.e. administrator, supervisor, manager, operator etc.) then to ensure the flexibility you want you may need to develop your table as you suggest. If you have a simple need to login and create a database connection then Forms logon screen will handle this.

You'll need to consider how users are added to the system and who'll administer it -- if each user has their own id, depending on which option you take someone will need to create a database user (through your security administrators) or enter the user into your table (which can be done in the application by a supervisor / manager).

...it's a question of security, administration of security and application requirements...
0
 
LVL 11

Expert Comment

by:sujit_kumar
ID: 13572214
>>do I have to create a table with names and passwords and just build a form which acts a log-on screen?
  Yes you will have to do it. Store the password in encrypted format. Then compare the password that user enters through the login screen with your password stored in DB. if correct then allo otherwise exit/show error.


You can also Active/Inactive a user and store the same as a flag in DB. Don't allow Inactive users.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cassiusduke
ID: 13582201
I did build a table like the following and a form which acts as a log-on screen but the code I wrote doesnot work properly.

drop table logon;
create table login
(username varchar2(30), password varchar2(30));
insert into login values('Bob', 'password');
insert into login values('Robert', 'password');

in the form under the when mouse click trigger
I typed in the following

declare
v_username varchar2(30);
v_password varchar2(30);

begin
select username, password
into v_username, v_password
from login
where username = v_username;

if v_username = 'bob and v_password = 'password' then
        open_form('e:\forms\workingforms\latest\studentopensupport2.fmx');
else
message('please enter a valid username and password');
end if;
end;

but this doesnot work can nayone tell me where am I going wrong?
thanks
cassiusduke
0
 
LVL 22

Expert Comment

by:Helena Marková
ID: 13589073
What does it mean "this does not work" ?
I cannot see in your code who is logged - what is the value of v_username ?
0
 

Expert Comment

by:psreedhar
ID: 13660801
username password validation thru table is not good practice . in your form
e:\forms\workingforms\latest\studentopensupport2.frm  

have a On-Logon trigger at form level  with following code .

-- code for On-Logon at Form Level

DECLARE

usname VARCHAR2(30);

paswd VARCHAR2(30);

constn VARCHAR2(30);

upc     VARCHAR2(200);

connected BOOLEAN := FALSE;

tries NUMBER := 3;

PROCEDURE get_conn_info is

BEGIN

usname := GET_APPLICATION_PROPERTY(USERNAME);

paswd := GET_APPLICATION_PROPERTY(PASSWORD);

constn := GET_APPLICATION_PROPERTY(CONNECT_STRING);

END;

BEGIN

get_conn_info;

IF usname IS NOT NULL THEN

LOGON(usname, paswd||'@'||constn, FALSE);

IF FORM_SUCCESS THEN /* Successful logon */

connected := TRUE;

END IF;

END IF;

WHILE connected = FALSE and tries > 0 LOOP

upc := usname||paswd||constn;

LOGON_SCREEN;

get_conn_info;

IF upc = usname||paswd||constn THEN

EXIT;

END IF;

LOGON(usname, paswd||'@'||constn, FALSE);

IF FORM_SUCCESS THEN /* Successful logon */

connected := TRUE;

END IF;

tries := tries - 1;

END LOOP;

IF NOT connected THEN

RAISE FORM_TRIGGER_FAILURE;

END IF;

END;

0
 

Accepted Solution

by:
PAQ_Man earned 0 total points
ID: 13893316
PAQed with no points refunded (of 30)

PAQ_Man
Community Support Moderator
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month14 days, 13 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question