Link to home
Start Free TrialLog in
Avatar of camposaa
camposaa

asked on

Oracle Database Roles and Oracle Forms

I am still working on my development environment...I have my forms running on the web.  After a user connected to the DB, a form opens with 10 different push buttons that allows them to go to other forms.  Well what I am trying to do is, depending on the their role (I created 6), only certain buttons will be enabled.  Like the Admin can click on them all of course, but like a certain user has privileges to click say on only 5 buttons.  Right now everyone can click on every button but I want to fix this. I am trying to code the logic in my trigger, when_new_instance and I know that I have to set_item_property to false is they are not supposed to do this but I am having problems trying to return there role to my application so that in my logic, I can say like:  If role = xxxxx, then set_item_property...blah blah...Any ideas?  Thanks!
Avatar of randyd
randyd

first set allowed_to_run = false for all buttons.

then

SELECT granted_role FROM dba_role_privs WHERE grantee = USER

if granted_role = a known role, then set aloowed_to_run = true

hth
randy
Avatar of camposaa

ASKER

I've tried that, my statement looks like

SET_ITEM_PROPERTY('CONTROL.BUTTON_ALR', ENABLED, PROPERTY_FALSE);

But I keep getting an error,

FRM-41032:  Cannot set ENABLED attribute of current item %s.%s.

Cause:     A call to SET_ITEM_PROPERTY attempted to set the Enabled attribute of the current item.

Action:     Either correct the call to SET_ITEM_PROPERTY or navigate to another item before setting the Enabled attribute.

Level:     >25

Any ideas?

Type:     Error
ASKER CERTIFIED SOLUTION
Avatar of M-Ali
M-Ali

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial