473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Begginer , Problem In Keys

2
Hi, experts. I need your help on solving a problem of mine.
in trying to make an <insert> in a table, i have a error message saying that i have violated the integirty constrain and that the parent key is not found.
it says that the only solution is to either delete the foreign key or to add a machting primary key. Could you help me?

very urgent!

Thanks in advance
Mar 2 '07 #1
3 1516
This occurs when you insert into the child table before inserting in the parent table.

you have to find the foreign keys in the table where you are inserting.

with this keys identify the parent tables, therofore do your insert in the parent tables and thereso you insert in your table.

If you have to insert later in the parent tables (it's no recommended to do that), you can disable the foreig keys in your table and do your insert.

thanks



Hi, experts. I need your help on solving a problem of mine.
in trying to make an <insert> in a table, i have a error message saying that i have violated the integirty constrain and that the parent key is not found.
it says that the only solution is to either delete the foreign key or to add a machting primary key. Could you help me?

very urgent!

Thanks in advance
Mar 2 '07 #2
vijaydiwakar
579 512MB
Hi, experts. I need your help on solving a problem of mine.
in trying to make an <insert> in a table, i have a error message saying that i have violated the integirty constrain and that the parent key is not found.
it says that the only solution is to either delete the foreign key or to add a machting primary key. Could you help me?

very urgent!

Thanks in advance
try to add the row in parent tbl first then use this qry
if problem is solved then ok else give me thy tbl structure
with som edata and contraints
Mar 3 '07 #3
debasisdas
8,127 Expert 4TB
Hi ,
First of all u should understand the relation ship between tables.when there is a parent child relationship between 2 tables ,the record in child always refers to its parent. As per the rule if there is no parent ,the child is orphan, so child cant exist. So if u want to insert any child record ,its corresponding parents record must exist.
Same rule applies to record delete also. If there is any dependent child record ,parent record cant deleted.
Mar 10 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Player | last post by:
During my setup install of python, I came across an option stating... Compile python files to, .pyc I left it unchecked for now, should I of done otherwise?? As I am a begginer to this, I...
31
by: Robert Brown | last post by:
Let's say I have a type hierarchy: (just an example) the general entity customer: CREATE TABLE customer(customer_id int, customer_name varchar(250), customer_type int) three specific...
0
by: OC | last post by:
Because of the requirements on a high-speed data entry form, I need to reliably trap certain keys (specifically the "/", "*", "-", and "+") keys on the 10-key pad and treat them as "Function keys"....
4
by: pixel | last post by:
hi i just discovered something strange when i use in ProcessCmdKey this construction switch(keyData) { case Keys.Left: {
14
by: vatamane | last post by:
This has been bothering me for a while. Just want to find out if it just me or perhaps others have thought of this too: Why shouldn't the keyset of a dictionary be represented as a set instead of a...
2
by: thecamisland | last post by:
Hello, I'm a begginer. Is this going to work? Dim fm As FirstMenu Class TransHeadInfo Public Function Validate() As Boolean ... fm.Show() ...
11
by: John | last post by:
I am coding a radix sort in python and I think that Python's dictionary may be a choice for bucket. The only problem is that dictionary is a mapping without order. But I just found that if the...
2
by: Charles Law | last post by:
I'll kick myself when you tell me, but ... I have a user control on a form, and I want the user control to see the arrow keys when I press them. If I press just about any other key the control's...
13
by: deshix | last post by:
Hi everyone, can you recommend me the best way to learn the PHP? I'm really begginer...
0
by: Menlalen | last post by:
K E Y S , A L I C I A M P 3 D O W N L O A D *Fallin 2001* 'Keys, Alicia - Fallin' (http://tinyurl.com/4zg3sr) (3:30 4.82Mb 192kbps) 'Keys, Alicia - Fallin (ft BustaRhymes and Rampage)'...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.