Home » Developer & Programmer » Forms » FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 (Oracle Forms 10g, WinXP)
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 [message #519964] Wed, 17 August 2011 23:11 Go to next message
khouw
Messages: 2
Registered: July 2011
Location: Indonesia
Junior Member

Dear all,

I have a form which contains tabular layout which i can fill a text item with date format. I set the data type properties to "Date" with format mask "dd-mm-yyyy".
When I click a "save" button, it will call a procedure to insert into table. But i'm getting this error message : "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502"

I did some search on google and error 06502 means numeric or value error. But I don't understand what caused my error. Is it at my text item's properties?

Any help will be appreciated Very Happy
Re: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 [message #519966 is a reply to message #519964] Wed, 17 August 2011 23:28 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you post a procedure? It raised an error, but it is difficult to guess what you did wrong as you didn't post the code.
Re: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 [message #519968 is a reply to message #519964] Wed, 17 August 2011 23:38 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
I think the problem lies in your procedure's insert statement. Check your insert statement.
Re: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 [message #519970 is a reply to message #519966] Wed, 17 August 2011 23:48 Go to previous messageGo to next message
khouw
Messages: 2
Registered: July 2011
Location: Indonesia
Junior Member

Here's my button's WHEN-BUTTON-PRESSED trigger
BEGIN
	Go_Block('Student_Awd');
	First_Record;
	LOOP
		Ins_Student_Award(:student_awd.awd_typ_desc, :head_blk.stu_id, :head_blk.semester, :head_blk.awd_id, :student_awd.stu_awd_point, :student_awd.stu_awd_date);
		Down;
		EXIT WHEN :student_awd.awd_typ_id IS NULL;
	END LOOP;
	Commit;
	Clear_Message;
	Clear_All;
END;

there are two blocks: head_blk for header where i get the student id, and student_awd where i can fill student's awards date and his achievement

Here's my Ins_Student_Award procedure
CREATE OR REPLACE PROCEDURE DBA.Ins_Student_Award(p_awd_id IN NUMBER, p_stu_id IN VARCHAR2, p_smt IN VARCHAR2, p_lan_id IN NUMBER, p_point IN NUMBER, p_date DATE) IS
  v_Dummy    CHAR(1);
  v_Id       NUMBER;
BEGIN
  SELECT DISTINCT 'X' INTO v_Dummy
  FROM stu_awd
  WHERE stu_id = p_stu_id AND stu_awd_smt = p_smt AND awd_typ_id = p_awd_id AND stu_awd_id = p_lan_id;
  UPDATE stu_awd
  SET stu_awd_point = p_point, stu_awd_date = p_date
  WHERE stu_id = p_stu_id AND stu_awd_smt = p_smt AND awd_typ_id = p_awd_id AND stu_awd_id = p_lan_id;
EXCEPTION
WHEN No_Data_Found THEN
  SELECT NVL(MAX(stu_awd_id), 0) INTO v_Id
  FROM stu_awd
  WHERE stu_id = p_stu_id AND stu_awd_smt = p_smt AND awd_typ_id = p_awd_id;
  v_Id := v_Id + 1;
  INSERT INTO stu_awd(awd_typ_id, stu_id, stu_awd_smt, stu_awd_id, stu_awd_point, stu_awd_date)
  VALUES(p_awd_id, p_stu_id, p_smt, v_id, p_point, p_date);
END Ins_Stu_Langgar;
/


-- edit
I already found the cause of that error. It's because the text properties of text item for stu_awd_id (:head_blk.awd_id) is set to Date. It must be set to Char. Careless me >.<

Nevermind about this thread. Moderator please delete this thread. I'm really sorry >.<

[Updated on: Thu, 18 August 2011 02:03]

Report message to a moderator

Re: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 [message #570031 is a reply to message #519968] Sun, 04 November 2012 23:26 Go to previous messageGo to next message
sedaghat
Messages: 1
Registered: November 2012
Location: iran
Junior Member
when i want fetch of database(instruction for fetch of database writen in triger new form instanse) after run see an error : FRM-40735 : when new form instanse triger rased unhandle exeption ora 06502
please help me
thanks
Re: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502 [message #570039 is a reply to message #570031] Mon, 05 November 2012 00:46 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is kind of difficult to guess what might be wrong. See if the following helps.

Oracle
ORA-06502: PL/SQL: numeric or value errorstring

Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).

Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
Previous Topic: Read URL Header in forms
Next Topic: Oracle spread table OCX
Goto Forum:
  


Current Time: Fri Apr 26 16:41:40 CDT 2024