Home » Developer & Programmer » Forms » LOGIN USER FROM ONE CANVAS AND ACCESS SECOND CANVAS AS PER USER RIGHTS (Oracle9i Enterprise Edition Release 9.0.1.1.1 - Production, FORM 6I, WIN 2003)
LOGIN USER FROM ONE CANVAS AND ACCESS SECOND CANVAS AS PER USER RIGHTS [message #569100] Sat, 20 October 2012 03:28 Go to next message
hissam78
Messages: 193
Registered: August 2011
Location: PAKISTAN
Senior Member
DEAR ALL,
- we have user id parameter.
can we update the parameter(:parameter.p_userid) before firing "WHEN NEW FORM INSTANCE TRIGGER"(when new form instance trigger contain code for tree node), for login another
canvas as per user rights?
- i have created a login form in one canvas.
- also tree node Hierarchy form created on another canvas. now we want to login
through login screen, after login only those forms should show in tree Hierarchy
which users have rights. for this purpose we want to pass the parameter of userid
before connecting to tree node form through the following query

SELECT COUNT (*)
INTO v_count
FROM usersinfo
WHERE usersname = :USERBLOCK.usernames AND passwords = :USERBLOCK.passwords ;

IF v_count <> 0
THEN
:parameter.p_username := :usernames;
:parameter.p_password := :passwords;

SELECT usersid
INTO :parameter.p_userid
FROM usersinfo
WHERE usersname = :USERBLOCK.usernames AND passwords = :USERBLOCK.passwords ;


Every thing is working but when we click on button in login form at that time parameter.p_userid will return null. because above code is define on button click in login screen, i cannot understand where i need to define the above code .

some body can help me.
Re: LOGIN USER FROM ONE CANVAS AND ACCESS SECOND CANVAS AS PER USER RIGHTS [message #569116 is a reply to message #569100] Sat, 20 October 2012 14:50 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
Every thing is working but when we click on button in login form at that time parameter.p_userid will return null. because above code is define on button click in login screen

I'm sorry, but I don't understand what you are saying. Could you post a screenshot of your login form and explain which button's trigger (it is the WHEN-BUTTON-PRESSED, I suppose?) contains code you posted? Also, it would be nice if you post the complete code; there's END IF that is missing (at least). What do you do when v_count equals 0?

Please, make sure to read and follow instructions located here (it will take only a few seconds of your time, but will significantly improve quality of your future messages). Unformatted code is difficult to read, you know.
Previous Topic: How to call any application (.exe) from menu
Next Topic: FRM-41344 ole object not defined for .. in the current record
Goto Forum:
  


Current Time: Wed Jul 03 10:28:54 CDT 2024