Click here to Skip to main content
15,911,360 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have created Application Process(Pl Sql function Returning Boolean) for Displaying the User details,

Query is:

declare
SQL
l_count number;
begin
select count(*) into l_count from usermaster where usertypeid in 
( select usertypeid from usermaster where usertypeid !=1 and userid=:P9_USERID or userid=:new);
 if l_count > 0 then
 return true;
 else
htp.p('<script language="javascript">');
htp.p('alert("Sorry! You dont have Permission to view other information")');
htp.p('window.location ="http://localhost:8080/apex/f?p=112:8:&SESSION.::NO::"');
htp.p('</script>');
 return false;
 end if;
 end;

====
when i am using :new keyword using inside the Pl Sql code it Showing the Error like this:

ORA-01008: not all variables bound
Error ERR-1082 Error in executing authorization scheme code.

Pls, Anyone tell me how to write correct code..

regards,
Udayakumar.P
Posted
Updated 2-Oct-11 20:38pm
v2

1 solution

:new represents a row so you have to state which column. E.g.
SQL
...
or userid=:new.userid
...
 
Share this answer
 
Comments
udayakumarcgvak 3-Oct-11 8:57am    
hi simon,
thanks for your suggestion , but i have already tried like this..it's also showing same error.

Thank u..
UdayaKumar
Simon Bang Terkildsen 3-Oct-11 9:31am    
yeah and I notice now, that you're talking about a function not a trigger, thus you don't have :new and :old, you have to pass the userid to your function.
udayakumarcgvak 5-Oct-11 2:35am    
hi simon,
I Used like this..
USERID is null or :P9_USERID is null
Now it's working Fine,
Thank U ..
Udayakumar
Simon Bang Terkildsen 5-Oct-11 2:37am    
You're welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900