Home » Developer & Programmer » Forms » Forms 6i - integrity constraint error
Forms 6i - integrity constraint error [message #260557] Mon, 20 August 2007 05:20 Go to next message
ora_dev
Messages: 27
Registered: December 2006
Junior Member
Hi

I am using forms 6i. I have two tables in the form with a master (STOCK_HEADER) detail (STOCK_DETAIL) relationship. There is a foreign key relationship on these tables with column stock_id. I display the records from these two tables and the user selects records he wants.

I created two other temporary tables T_STOCK_HEADER and T_STOCK_DETAILS with NO foreign key relationship.

I press button and it runs two procedures. One inserts a header record into T_STOCK_HEADER from STOCK_HEADER with a new stock_id and the other procedure inserts records into T_STOCK_DETAILS from STOCK_DETAIL with the same new stock_id.

I now get an ORA-02291 integrity constraint error - parent key not found. There are no foreign key constraints between these two temporary tables. This constraint applies to the two original tables ie. STOCK_HEADER and STOCK_DETAIL. Why am I getting this error on the temporary tables.

Thanks
Re: Forms 6i - integrity constraint error [message #260568 is a reply to message #260557] Mon, 20 August 2007 05:45 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You are not.

If there's no referential integrity constraint between temporary tables, you can't get an error message, no matter what you insert in there.

This error regards original tables.

Did you double-check that you really insert record into T_STOCK_DETAIL and not into STOCK_DETAIL, and that there's no data in 'detail' block of your form which are trying to get into the STOCK_DETAIL (while 'master' is empty)?
Re: Forms 6i - integrity constraint error [message #260585 is a reply to message #260568] Mon, 20 August 2007 06:43 Go to previous messageGo to next message
sispk6
Messages: 164
Registered: November 2006
Location: pakistan
Senior Member
dear
u have done a smalll blunder probably , you must be dealing with orignal tables ( may be unconsiously)
Re: Forms 6i - integrity constraint error [message #260786 is a reply to message #260557] Mon, 20 August 2007 22:47 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What is the problem that you are trying to solve? This solution seems unusual.

David
Previous Topic: Developer 9i code problem
Next Topic: How to create micro soft word file from oracle database using forms 6i
Goto Forum:
  


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