Home » Developer & Programmer » Forms » i am getting error in forms 6i "Foreign key value does not currently exist in primary key table
i am getting error in forms 6i "Foreign key value does not currently exist in primary key table [message #282431] Thu, 22 November 2007 00:08 Go to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Dear Friends,

What about solution for This error.

We are using forms 6i and Oracle 8i.

"Foreign key value does not currently exist in primary key table"


Should i have to create any foreign key in table.

Give some suggestions.

Advance Thanks

Manoharan
Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282433 is a reply to message #282431] Thu, 22 November 2007 00:11 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>Should i have to create any foreign key in table.
NO, the table already exists, but the parent record does not exist.
Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282434 is a reply to message #282433] Thu, 22 November 2007 00:13 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Friend,

Please explain little more.

Regards

Manoharan
Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282435 is a reply to message #282431] Thu, 22 November 2007 00:15 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
visit http://tahiti.oracle.com & read the Concepts Manual
Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282438 is a reply to message #282435] Thu, 22 November 2007 00:19 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,

sorry i could not find out from your url.

How parent record is not exist when child records exist.

Manohar



Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282443 is a reply to message #282431] Thu, 22 November 2007 00:24 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>How parent record is not exist when child records exist.
Please post proof that the "child records exist".
The failure/error occurs when you attempt & fail to INSERT the child record when the parent record does NOT exist.
Re: "Foreign key value does not currently exist in primary key table" error [message #282446 is a reply to message #282431] Thu, 22 November 2007 00:33 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's a Scott example: there's the DEPT table with departments 10, 20, 30 and 40. There's also the EMP table which has a foreign key from emp.deptno to dept.deptno.

You are trying to insert an employee whose department is 50 (which does NOT exist in the DEPT table).

What to do? Enter a valid value into this column.
Re: "Foreign key value does not currently exist in primary key table" error [message #282447 is a reply to message #282431] Thu, 22 November 2007 00:33 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What is your form supposed to be doing? Are you running a new master-detail form and getting this error? Are you writing a new single block form and there is data missing from another table?

David
Re: "Foreign key value does not currently exist in primary key table" error [message #282453 is a reply to message #282447] Thu, 22 November 2007 00:54 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
One question - one thread!!

David
Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282514 is a reply to message #282431] Thu, 22 November 2007 04:02 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
My Dear Friends,

Thanks for your times. i solved problem. Exactly that is master-detail problem only. in customer place they want to insert one record in detail. but one column it's referred by master record. this column not exist in master table. then they have created. now problem rectified.

I came to know now the following error is user defined error.

"Foreign key value does not currently exist in primary key table"

Thanks & Regards

Manoharan
Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282523 is a reply to message #282514] Thu, 22 November 2007 04:29 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No, it is NOT user-defined exception. It is ORA-02291:
Quote:

ORA-02291: integrity constraint (string.string) violated - parent key not found

Cause: A foreign key value has no matching primary key value.

Action: Delete the foreign key or add a matching primary key.

Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282659 is a reply to message #282523] Thu, 22 November 2007 22:33 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Hi,

This error written by user in Message

like message('Foreign key does not exist...')

thanks

Mano

Re: i am getting error in forms 6i "Foreign key value does not currently exist in primary key t [message #282678 is a reply to message #282659] Fri, 23 November 2007 00:03 Go to previous message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I see. What additional functionality did this "message" provide (which Oracle doesn't offer by default)? Except that it may sound more poetic?
Previous Topic: My ifrun60.exe opens then immediately closes
Next Topic: How to use unicode in Developer
Goto Forum:
  


Current Time: Sun Dec 04 10:23:11 CST 2016

Total time taken to generate the page: 0.04314 seconds