Home » Developer & Programmer » Forms » FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed (Oracle Forms, 6i Patch 18 (6.0.8.27), Windows XP SP3)
icon4.gif  FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #509472] Sat, 28 May 2011 03:15 Go to next message
mbzhackers
Messages: 4
Registered: May 2011
Location: Tunisia
Junior Member
Hello,

I have a client who is facing the above error. Everything used to work perfectly but since a week, he gets this error message on a specific FORM.

No updates have been made to the FORM.

The FMXs are stored on the database server(10G R3, Windows 2003 R2) and the Client terminals access them through a network drive.
When executing the conflicting FORM on the server, no error.

I call the DBMS_ERROR_CODE routine from a FORM-LEVEL ON-ERROR trigger :

DECLARE
	ERR NUMBER;
BEGIN
	IF DBMS_ERROR_CODE=-1 THEN
		MSG('Client existant',ERR,'E');
	ELSE
		message(error_type||'-'||error_code||' : '||error_text);
	END IF;
	RAISE FORM_TRIGGER_FAILURE;
END;


Code for procedure MSG :

PROCEDURE MSG(TXT_MSG IN VARCHAR2 , RET_REP OUT NUMBER , TYPE_MSG IN CHAR DEFAULT 'I' , 
              LABEL_BUT1 IN VARCHAR2 DEFAULT 'OK' , LABEL_BUT2 IN VARCHAR2 DEFAULT NULL , 
              LABEL_BUT3 IN VARCHAR2 DEFAULT NULL) IS
  VL_ALERT ALERT;
BEGIN
  IF upper(TYPE_MSG) = 'E' THEN
  	VL_ALERT:=FIND_ALERT('ERROR');
  ELSIF upper(TYPE_MSG) = 'W' THEN
  	VL_ALERT:=FIND_ALERT('WARNING');
  ELSIF upper(TYPE_MSG) = 'I' THEN
  	VL_ALERT:=FIND_ALERT('INFO');
  END IF;
  SET_ALERT_BUTTON_PROPERTY(VL_ALERT,ALERT_BUTTON1,LABEL,LABEL_BUT1);
  SET_ALERT_BUTTON_PROPERTY(VL_ALERT,ALERT_BUTTON2,LABEL,LABEL_BUT2);
  SET_ALERT_BUTTON_PROPERTY(VL_ALERT,ALERT_BUTTON3,LABEL,LABEL_BUT3);
  SET_ALERT_PROPERTY(VL_ALERT,ALERT_MESSAGE_TEXT,TXT_MSG);
  RET_REP:=SHOW_ALERT(VL_ALERT);
END;


Could you help me please ?
Re: FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #509477 is a reply to message #509472] Sat, 28 May 2011 05:14 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
Everything used to work perfectly but since a week, he gets this error message on a specific FORM.

What changed, then? Something must have, I guess.

Did you try to recompile the form (Ctrl + Shift + K)?
Re: FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #509478 is a reply to message #509477] Sat, 28 May 2011 05:17 Go to previous messageGo to next message
mbzhackers
Messages: 4
Registered: May 2011
Location: Tunisia
Junior Member
Littlefoot wrote on Sat, 28 May 2011 11:14
Quote:
Everything used to work perfectly but since a week, he gets this error message on a specific FORM.

What changed, then? Something must have, I guess.

Did you try to recompile the form (Ctrl + Shift + K)?

I don't know what changed. The client keeps saying that he hasn't changed anything.
I didn't try to recompile, I'll try.
Re: FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #509482 is a reply to message #509478] Sat, 28 May 2011 05:35 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Only reason I can think of for that builtin to fail is if the error that caused the on-error trigger to fire also resulted in the form losing it's DB session.
So if a recompile doesn't work you may have to debug the form and work out exactly what is causing the original error.
Re: FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #509483 is a reply to message #509482] Sat, 28 May 2011 05:41 Go to previous messageGo to next message
mbzhackers
Messages: 4
Registered: May 2011
Location: Tunisia
Junior Member
cookiemonster wrote on Sat, 28 May 2011 11:35
Only reason I can think of for that builtin to fail is if the error that caused the on-error trigger to fire also resulted in the form losing it's DB session.
So if a recompile doesn't work you may have to debug the form and work out exactly what is causing the original error.


Understood.
I'll delete the ON-ERROR trigger in order to have the causing error raised in its original state.
Re: FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #510479 is a reply to message #509472] Mon, 06 June 2011 03:35 Go to previous messageGo to next message
mbzhackers
Messages: 4
Registered: May 2011
Location: Tunisia
Junior Member
Hello,

After the recompile, nothing changed.
As mentioned, I removed the ON-ERROR trigger.
When commiting, he gets FRM-40508: ORACLE error: unable ton INSERT record. When clicking Help ==> Display error, he gets FRM-42100: No errors encountred recently.

Furthermore, I made the DATA BLOCK not linked the DB and added this Key-Commit trigger :

DECLARE
	ERR NUMBER;
BEGIN
	INSERT INTO CLIENTS(COD_DOUANE,NOM_PRE_CLT,ADR1)
	VALUES (:CLIENTS.COD_DOUANE,:CLIENTS.NOM_PRE_CLT,:CLIENTS.ADR1);
	STANDARD.COMMIT;
	MSG('Insertion effectuée avec succès',ERR,'I');
EXCEPTION
	WHEN OTHERS THEN
		MSG(SQLERRM,ERR,'E');
END;


Now, when commiting, he gets ORA-01009: missing mandatory parameter.
This is structure of table CLIENTS :
TABLE clients
 Name                                      Null?    Type                        
 ----------------------------------------- -------- ----------------------------
 COD_DOUANE                                NOT NULL VARCHAR2(8)                 
 NOM_PRE_CLT                                        VARCHAR2(175)               
 RAI_SOC_CLT                                        VARCHAR2(175)               
 ADR1                                               VARCHAR2(70)                
 ADR2                                               VARCHAR2(70)                
 ADR3                                               VARCHAR2(70)                
 COMMISSION                                         NUMBER(15,3)                
 TAUX_TVA                                           NUMBER(22,2)                
 PDL                                                NUMBER(22,3)


I forgot to mention in my first post that this problem occurs only with my client. For me, everything works OK and I work on a dump of his database.
Re: FRM-40733: PL/SQL built-in DBMS_ERROR_CODE failed [message #510492 is a reply to message #510479] Mon, 06 June 2011 04:17 Go to previous message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
I think you may need to take this one up with oracle support. Details on that error are sketchy at best.
There are a few thinks on My Oracle Support about it but they all seem to relate to oracle e-business suite.
Previous Topic: PDE-PEP006 Encoded Program Unit has an Unknown Format
Next Topic: How to use external Tables in Oracle Forms 10g
Goto Forum:
  


Current Time: Thu Sep 12 09:04:32 CDT 2024