Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ON-ERROR trigger fires with Error_Type null and Error_Code 0

450441Jul 22 2010 — edited Jul 22 2010
We've recently seen our 6i Forms application throwing some odd errors, not least of which is when an alert popped up with just "-0:" displayed.

This seems to come from the ON-ERROR trigger.
DECLARE 
   lv_errcod  NUMBER       := ERROR_CODE; 
   lv_errtyp  VARCHAR2(3)  := ERROR_TYPE; 
   lv_errtxt  VARCHAR2(80) := ERROR_TEXT; 
   lv_dbmserr NUMBER       := DBMS_ERROR_CODE;
   lv_albut   NUMBER;
BEGIN 
  IF (lv_errcod = 40508) THEN 
      -- Failure on insert
    
    IF lv_dbmserr = -1031 THEN
     	 -- Insufficient Privileges
      Display_Alert( 'You do not have permission to create new records here.');
      Raise Form_Trigger_Failure;
    ELSE
      Display_Alert( 'Unable to create record.');
      Raise Form_Trigger_Failure;
    END IF;	 
    
  ELSIF (lv_errcod = 40510) THEN 
      -- Failure on delete
    
    IF lv_dbmserr = -1031 THEN
     	 -- Insufficient Privileges
      Display_Alert( 'You do not have permission to delete records here.');
      Raise Form_Trigger_Failure;
    ELSIF lv_dbmserr = -2292 THEN
     	 -- Integrity Constraint violated
      Display_Alert( 'Cannot delete this record - Data exists on other tables that uses this value.');
      Raise Form_Trigger_Failure;
    ELSE
      Display_Alert( 'Unable to delete record.');
      Raise Form_Trigger_Failure;
    END IF;	
 
   ELSIF (lv_errcod = 40200) THEN    
      message('This field is protected against update');
  ELSE 
    Display_Alert(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt); 
    RAISE Form_Trigger_Failure; 
  END IF; 
END;
At least there's nowhere else that could be doing it. It seems that error_type and error_text are null and error_code is 0

It's as if the ON-ERROR trigger has fired but there isn't an error. Anyone ever experienced this? It's been ported to a VM environment but ran perfectly fine for 6 months and has only started doing this in the last few days.

It's also occasionally saying that queries return no results when the users KNOW there are records, and if they log out completely and log back in the records are returned, which is doing nothing for their confidence in the application.

It's entirely possible that one of the teams responsible for various parts of the VM environment or network, or even the DBAs, has done something that caused it but we're unlikely to get them to admit it without knowing what it could be. I would expect a dropped connection or network issue to give an appropriate error, not freak out.

Edited by: Dave Hemming on Jul 22, 2010 9:48 AM

Edited by: Dave Hemming on Jul 22, 2010 9:49 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2010
Added on Jul 22 2010
3 comments
2,052 views