?
Solved

creating a log-in screen in oracle forms 9i

Posted on 2005-03-16
8
Medium Priority
?
4,898 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit 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 real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

771 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