FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503
771549Nov 25 2010 — edited Nov 29 2010Hello to all...
I am developing a form on form 6i like a registration form....
Suppose emp_name is a text item....
I need to validate that item such that number ,null and special characters should not be allowed.
I have created a function to check those validations
function v_check(p_item_name varchar2)
return boolean is
begin
for i in 1..length(p_item_name)
loop
if substr(p_item_name,i,'1') in ('1','2','3','$','%','@','!','#') then
return false;
end if;
end loop;
end v_check;
When i click on save_Record button it commit the form i'm checking the emp_name field with this validation by calling the above function.
for save_Record button i have written this code WHEN-BUTTON-PRESSED trigger
declare
a number;
begin
if :iptable.ip_name is null or (not v_check(:iptable.ip_name)) then
set_alert_property('alert',title,'name validation');
set_alert_property('alert',alert_message_text,'null ans spl char are not allowed');
a:=show_alert('alert');
go_item('iptable.ip_name');
raise form_trigger_failure;
end if;
if :system.form_status='CHANGED' then
set_alert_property('alert',title,'Save Box');
set_alert_property('alert',alert_message_text,'Do u want to save');
a:=show_alert('alert');
if a=alert_button1 then
commit_form;
else
raise form_trigger_failure;
end if;
else
set_alert_property('alert',title,'Save Box');
set_alert_property('alert',alert_message_text,'noting to Save Box');
raise form_trigger_failure;
end if;
end;
But i'm gettin this
FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06503
exception
How can i resolve this error...help me
thanks...
Edited by: maddyd2k on Nov 25, 2010 10:37 AM