EXCEPTIONAL CODE does not work... Help, please

Hye all the...

I have a code through which I can pick up on WHEN BUTTON PRESSED after selecting an option in the radio group... Code is very well...
but some time the data resulting is the value null in the table and he goes to an empty table... Here is the code
declare
a varchar2 (20);
Start
If: result. RadioGroup = 'enrolid' then
a: = 'enrol_id =' |: result. Search;
set_block_property('student_result',default_where,a);
go_block ('student_result');
execute_query;
elsif: result.radiogroup = 'semesterid' then
a: = 'semester_id =' |: result. Search;
set_block_property('student_result',default_where,a);
go_block ('student_result');
execute_query;
elsif: result.radiogroup = 'courseid' then
a: = 'course_id =' |: result. Search;
set_block_property('student_result',default_where,a);
go_block ('student_result');
execute_query;
elsif: result.radiogroup = 'gpa' then
a: = 'gpa =' |: result. Search;
set_block_property('student_result',default_where,a);
go_block ('student_result');
execute_query;
elsif: result.radiogroup = 'status' and then
a: =' status =' | "'|: result.search | ''';
set_block_property('student_result',default_where,a);
go_block ('student_result');
execute_query;
end if;

exception
When no_data_found then
message ('INVALID FORMATE or NO DATA FOUND');
message ('INVALID FORMATE or NO DATA FOUND');
end;


I WANT to have some sort of MESSAGE that appears what query do cause no selected lines... I use the correct exception?

Welcome to the Oracle Forums. Please take a few minutes to review the following:


Following these simple guidelines will ensure a positive experience in any forum; not just this one! ;-)

It has been my experience that when you use the built-in function Execute_Query the NO_DATA_FOUND exception is handled at the error - released level rather than the local exception handler. If you run a SQL statement in a trigger, then local exception handler will catch the exception - if you have a. Check your form/block-Error trigger level and add a handler for the ORA-01403 or FRM-40735 errors and display your message here.

Hope this helps,
Craig B-)

If someone useful or appropriate, please mark accordingly.

Tags: Oracle Development

Similar Questions

Maybe you are looking for