Home » Developer & Programmer » Forms » frm-40735:post_query triger rasied unhandled exception ora-06502
frm-40735:post_query triger rasied unhandled exception ora-06502 [message #203255] Tue, 14 November 2006 08:42 Go to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
eLLO,

I RECIEVE THIS MESSAGE: frm-40735:post_query triger rasied unhandled exception ora-06502 WHEN I TRY TO ENTER MORE PRODUCT_ID'S IN THE FIELD WHICH SHOULD HOLD ABOUT 5 AT LEAST. THE POST QUERY FOR THIS IS POPULATING FURTURE INFORMTION BOUT THE PRODUCT_ID SO FOR EXAMPLE PRODUCT_NAME ETC..
Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #203272 is a reply to message #203255] Tue, 14 November 2006 09:52 Go to previous messageGo to next message
yogen
Messages: 39
Registered: October 2006
Location: UK
Member


before end of the pl/sql block you need to handle the exception

write this code there..

Declare

begin

Exception
when others then
message(SQLERRM);


end;
compile and run the form again for the same error condition and see the message it will tell you why the exception is being raised.
Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #203296 is a reply to message #203272] Tue, 14 November 2006 12:10 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It appears that POST-QUERY trigger doesn't handle data as it should - there's an error there.

This is what Oracle says about this error:
Oracle
ORA-06502 PL/SQL: numeric or value error string

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.
Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #203308 is a reply to message #203296] Tue, 14 November 2006 13:12 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Hi there, i see that error message but i dont know what data it is that i really need to change i mean the two table below:

CREATE TABLE CUSTOMER_ORDER4
( Customer_order_ID VARCHAR2(6) NOT NULL,
Customer_ID VARCHAR2(6) NOT NULL,
Staff_ID VARCHAR2(6),
CO_Date DATE NOT NULL,
Payment_Received VARCHAR(6) NOT NULL,
Payment_TYPE VARCHAR2(12) NOT NULL,
Cardholder_name VARCHAR2(30),
Card_type varchar2(20),
Card_number varchar2(40),
Security_code varchar2(3),
Valid_from DATE,
Expiry_date DATE,
CO_Status varchar2(15),
constraint cust_ord_iId_pk PRIMARY KEY (Customer_order_ID),
constraint cust_iId_fk FOREIGN KEY (Customer_ID) REFERENCES CUSTOMER3,
constraint staff_iId_fk FOREIGN KEY (Staff_ID) REFERENCES STAFF);

This table has product_order_id as
C027
CO28
CO29

CREATE TABLE Customer_order_deliv
(Customer_order_ID varchar2(6) NOT NULL,
Product_ID varchar2(6),
Quantity_Required NUMBER NOT NULL,
Constraint cust_ord_Iid_prod_id_cpk primary key ( Customer_order_ID , product_id),
Constraint cust_ord_Iid_fk foreign key (Customer_order_ID) REFERENCES customer_order3 (Customer_order_ID),
Constraint product_iId_fk foreign key (product_id) REFERENCES product (product_id));


THIS TABLE ALLOWS ME TO PUT IN MULT DATA AND I HAVE USED A POST QUERY IN HERE AS FOLLOWS:

BEGIN
SELECT Prodcut_Name
INTO :Customer_order_del.PRODUCT_NAME
FROM PRODUCT
WHERE Product_ID = :Customer_order_del.Product_ID;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END;

I DONT KNOW WHERE I AM GONIG WRONG BECAUSE MY POST QUERY CAN RETRIEVE DATA BUT ON THE THIRD GO IT DOESNT FOR SOME REASEAN BUT IT DOES SAVE THE CHANGES SOO ERM GOT ANY VIEWS THAT CAN HELP ME?!

[Updated on: Tue, 14 November 2006 13:20]

Report message to a moderator

Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #203323 is a reply to message #203308] Tue, 14 November 2006 15:37 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I suppose (as you didn't provide 'product' table description) that 'product.product_name' is of a CHARACTER type. Such a type should also be field in the form ('customer_order_del.product_name'). Could you check length of both table column and form field, compare them and see whether the form field is too short to accept that specific 'product_name' value.
Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #203788 is a reply to message #203323] Thu, 16 November 2006 05:33 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Cool thank you!!!!!!!!
Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #259364 is a reply to message #203255] Wed, 15 August 2007 04:54 Go to previous messageGo to next message
nirasha
Messages: 4
Registered: November 2000
Location: South Africa Johannesburg
Junior Member
Hi

I am having a similar error message when i run my form.
FRM-40735 WHEN-TIMER-EXPIRED trigger raised unhandled exception ORA-06502. Please can you assist me. I have checked the data type on the VAT field and it is char. On the database it is Varchar(2). I cannot find any vat field which is Number that may beb conflicting with the data type. Any ideas??
Re: frm-40735:post_query triger rasied unhandled exception ora-06502 [message #259452 is a reply to message #259364] Wed, 15 August 2007 11:50 Go to previous message
yogen
Messages: 39
Registered: October 2006
Location: UK
Member
write this code

BEgin

----

----

exception
when others then
Message(SQLERRM);
Message(' ',NO_ACKNOWLEDGE);
end;

try to execute the trigger in small parts of the code so that you will come to know exactly which part is giving error.
send me the code i will check it.
Previous Topic: SELECT Records based on an array of values
Next Topic: database name in foms 6i
Goto Forum:
  


Current Time: Fri Sep 27 04:25:06 CDT 2024