Home » Developer & Programmer » Forms » Login form (was:"very" descriptive URGENT etc.) (merged)
icon6.gif  Login form (was:"very" descriptive URGENT etc.) (merged) [message #223264] Thu, 08 March 2007 03:44 Go to next message
prakash2007
Messages: 14
Registered: March 2007
Junior Member
hi i am new to oracle .. but i have to learn the forms and reports within one month.. so any one please help me .. now i wnat to know PL/SQL queries for the following questions .. anyone help me... so it`s very usefull for me...

i have designed a login form.. rightnow i wrought the query for just check the username and password against table values.. if yes it move to next form
i need the query for the situation .. if the username does not exist in table it show the error via alert..again it just clear the text feilds and the cursor shouldbe ib username textfeild ...

THANKS IN ADVANCE...........
Re: Queries for FORMS (Urgent reply pls) [message #223268 is a reply to message #223264] Thu, 08 March 2007 04:01 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Why would anyone create their own user table when Oracle already provides authentication? Anyway, here are some pointers.
You could:
  • make the block a control block.
  • create a when-validate-item on the username text field (make it mandatory and the first field of the block) that checks whether the user exists in the table. Fetch the password along the lines in a packaged variable.
  • create a when-validate-item on the password text field to verify whether it is the same as the password variable you fetched before.


MHE
Re: Queries for FORMS (Urgent reply pls) [message #223842 is a reply to message #223268] Mon, 12 March 2007 01:02 Go to previous messageGo to next message
rdhaprakasam
Messages: 37
Registered: February 2007
Location: Coimbatore
Member

thanks Maaher,where can i find the oracle provide authentication and how can i use that.. explain me
Re: Queries for FORMS (Urgent reply pls) [message #223875 is a reply to message #223842] Mon, 12 March 2007 03:06 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle authentication? You use it every time you log on to Oracle - you have to provide USERNAME, its PASSWORD and database ALIAS you are connecting to.

So, why would you want to create your own version of the same? You'll have to store usernames and passwords in a table (which could be abused). Create an Oracle user, give it required privileges and let it work.
Re: Queries for FORMS (Urgent reply pls) [message #223901 is a reply to message #223875] Mon, 12 March 2007 04:16 Go to previous messageGo to next message
rdhaprakasam
Messages: 37
Registered: February 2007
Location: Coimbatore
Member

thanks maheer,this is my request please tell what r the commands i use for privilage control.. for eg:an admin can view all the things and an user see the particular area only.. can u explain this with an example...
Re: Queries for FORMS (Urgent reply pls) [message #223904 is a reply to message #223875] Mon, 12 March 2007 04:19 Go to previous messageGo to next message
rdhaprakasam
Messages: 37
Registered: February 2007
Location: Coimbatore
Member

thanks litlefoot,this is my request, please tell what r the commands i use for privilage control.. for eg:an admin can view all the forms and control and an user see the particular area only.. can u explain this with an example...
also i don`t know how can i navigate between canvases
Re: Queries for FORMS (Urgent reply pls) [message #223919 is a reply to message #223904] Mon, 12 March 2007 04:56 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In old SQL*Menu 5.0, you would have created the whole menu and grant access to the particular submenu/form/report/etc. by entering desired role name into the "Item role" item.

I think that some kind of Menu Developer doesn't exist any more, as a standalone product. You'll create the menu using Forms Developer and display/hide or allow him/her to enter/or not items depending on users' privileges.

Perhaps it would be a good idea to create roles and grant access to roles instead of (possibly) many users - it will be easier for maintenance.
Re: Queries for FORMS (Urgent reply pls) [message #223934 is a reply to message #223919] Mon, 12 March 2007 05:18 Go to previous messageGo to next message
prakash2007
Messages: 14
Registered: March 2007
Junior Member
thanks littlefoot,
icon6.gif  prakash: urgent help my project [message #223936 is a reply to message #223264] Mon, 12 March 2007 05:32 Go to previous messageGo to next message
prakash2007
Messages: 14
Registered: March 2007
Junior Member
hi friends,
i am trying to develop the login form to determine the privileges .. here i have some problems.. whenever i am giving the user names which is not available in "login" table..it shows the following error "FRM-40735:WHEN VALIDATE-ITEM TRIGGER RAISED UNHANDLED EXCEPTION ORA=06502"... I AM JUST wrote the small query... can anyone solve my problem.. i need that if the username is not available in table ,the field must be clear all the fields and again the mouse pointer focus in user name field... please help me...

Re: prakash: urgent help my project [message #224032 is a reply to message #223936] Mon, 12 March 2007 13:03 Go to previous messageGo to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

u can go for this code. might be it help u..........
write it on a button.......

declare
var_user_name varchar2(20);
var_password varchar2(20);
begin
select user_name,password
into var_user_name,var_password
from <-your table name->
where user_name = :<-block_name->.<-item_name->
and
password = :<-block_name->.<-item_name->;
if :<-block_name->.<-item_name-> = var_user_name
and :<-block_name->.<-item_name-> = var_password
then
show_view('<-next canvas which u want to show->');
/* or call_form('<-next form which u want to call->');
else
:<-block_name->.<-item_name-> := null;
-- (user_name text item)
:<-block_name->.<-item_name-> := null;
-- (password text item)
end if;
end ;
Re: prakash: urgent help my project [message #224039 is a reply to message #224032] Mon, 12 March 2007 13:31 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Prakash2007, do not open a new topic for the same problem. Lately, you are trying to create a "login" form. Please, continue discussion in an existing topic.

Also, even more annoying, STOP naming your topics "Urgent pls" (and similar) as it is not descriptive at all; although moderators may change topic name, it is not the way it should be done.

If anything of this isn't clear, do say so and I'll try to explain it better.
Re: prakash: urgent help my project [message #247732 is a reply to message #224039] Wed, 27 June 2007 01:28 Go to previous message
lakshmi surya ram
Messages: 188
Registered: June 2006
Location: HYDERABAD
Senior Member

Hi Littlefoot,
Here as you said solution for assigning access to different users by creating roles and allow privileges to them.
I have created login form and also the navigator.Based on the user the navigator should show its forms. Is that roles is the solution for this?
how would I create roles in form?
Hope we are on same page...

please guide me in this staff

Thanks,
Surya
Previous Topic: Show Printer List
Next Topic: plugins for running oracle forms on solaris
Goto Forum:
  


Current Time: Fri Dec 09 06:00:21 CST 2016

Total time taken to generate the page: 0.13016 seconds