form execution in an application is improper [message #423798] |
Mon, 28 September 2009 06:20 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rhl23
Messages: 25 Registered: July 2009 Location: MUM
|
Junior Member |
|
|
Dear all,
I am creating some forms in an application. When I am trying to execute any of the trigger or procedure through an individual form , its getting executed properly, but in a application that form is not working. Its not getting executed properly. Can anybody tell me whats the reason that its happening like this.
Thank you in advance...
|
|
|
|
Re: form execution in an application is improper [message #424612 is a reply to message #423826] |
Sun, 04 October 2009 13:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rhl23
Messages: 25 Registered: July 2009 Location: MUM
|
Junior Member |
|
|
Actually i do have a multiform application .... the
1st form is -LOGIN - through which i am opening a home_page - on which there are two buttons which opens two different forms
1st button - it will open emp_report form which enable to add new employees in d emp database. I want to restrict the access to this form such dat employees from particular department which logins through login form can only open this form& others cant...
2nd button - It will open daily report form to which access is not restricted , anybody can access this.
I wrote this code for 1st button
DECLARE
CURSOR emp_cur IS
SELECT * FROM emp
WHERE deptid = 390;
BEGIN
FOR emp_rec IN emp_cur LOOP
IF
emp_rec.deptid = 390
THEN
OPEN_FORM('emp_data1');
END IF;
END LOOP;
END;
I realize dat its a wrong code as i didnt gave any reference of login id from login-form & m confused of how to reference it throught the application...I also tried to use GLOBAL variable by initializing it first in the login-form but again m not getting how can I restrict the access to particular department by using the global variable...
Please guide me on d same.... [EDITED by DJM: remove useless 'code' tags]
[Updated on: Tue, 27 October 2009 19:02] by Moderator Report message to a moderator
|
|
|
|
Re: form execution in an application is improper [message #424831 is a reply to message #423798] |
Tue, 06 October 2009 03:23 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
rhl23
Messages: 25 Registered: July 2009 Location: MUM
|
Junior Member |
|
|
Yes. I want to reference the user_id with reference to the department id 390.I mean another form should open only when the employee who logins through login form is the employee of department_id 390. But as I am new to create application i am not getting how to refere it.
So please guide me in this sense.
|
|
|
|
Re: form execution in an application is improper [message #426390 is a reply to message #424831] |
Thu, 15 October 2009 04:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
cookiemonster
Messages: 13963 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
rhl23 wrote on Tue, 06 October 2009 09:23Yes. I want to reference the user_id with reference to the department id 390.I mean another form should open only when the employee who logins through login form is the employee of department_id 390. But as I am new to create application i am not getting how to refere it.
So please guide me in this sense.
Well you'd have to take this code:
DECLARE
CURSOR emp_cur IS
SELECT * FROM emp
WHERE deptid = 390;
BEGIN
FOR emp_rec IN emp_cur LOOP
IF
emp_rec.deptid = 390
THEN
OPEN_FORM('emp_data1');
END IF;
END LOOP;
END;
And modify it so that the query restricts the emp table using the logged in user.
But since I have no idea what the relationship is between user and emp in your database I can't really help you any further.
|
|
|