It happens very often then when we query a database block, and the query does not return any rows, we just cannot navigate out of the block, unless some kind of data is returned via a query in that block. This can get very irritating, as the only way of this is to kill the form and open it again.

To over come that, we can do the following..

execute_query;
if :system.mode = 'ENTER-QUERY' then

exit_form; -- this runs if query failed

end if;

Once we have this code in the key_exeqry, we might also need a on message block level trigger, to handle the FRM-40301: Query caused no records to be retrieved. Re-enter." and "FRM-40353: Query cancelled."


Hosted by www.Geocities.ws

1