1 Reply Latest reply: Sep 1, 2009 1:07 AM by 719752 RSS

    Override on-lock trigger - problem

    699671
      Using headstart and oracle designer 9, i ran into a problem while trying to override the on-lock trigger on a base table block.

      Base table block V_EMP_DEPT is based on a read only view. I added an on-lock trigger in designer (overriding the "Transactional trigger for lock processing" code). The generated on-lock code looks like:

      /* CGAP$OLES_SEQUENCE_BEFORE */
      begin
      qms$event_data_block('ON-LOCK');
      end;
      begin
      --
      lock_my_precious_tables
      ( p_emp_id => :v_emp_dept.emp_id
      , p_dept_id => :v_emp_dept.dept_id
      )
      ;
      --
      end;

      The first block of code is where things go wrong; it eventually executes the standard lock (lock_record). Since this is not possible via the view (also because it uses a distinct select) I need a way to not generate this default behaviour. Any suggestions are welcome :)