473,327 Members | 2,094 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,327 software developers and data experts.

ForeignKeyConstraint StudentsSchYrSem requires the child key values (21000013) to exist in the parent table

I have created 3 sqldataadapter. each adapter.selectcommand has a
parameter. I have added a textbox to supply a value for each
parameter. My problem is when I press enter the second time to fire up
the keypress event from the textbox I recieved this error in datagrid
object "ForeignKeyConstraint StudentsSchYrSem requires the child key
values (21000013) to exist in the parent table"

I'm wondering before if I change the value of that textbox only the
second time have an error.

The parameter is lastname.
example if I provide a value in the textbox the first time and press
enter i did not recieve an error. the second time i change the value
of a textbox gives me an error. after that no error has occur.

seems this is a very strange error to me.
Nov 21 '05 #1
1 2627
Never mind. I have already solved the problem. The problem is that I
bind it two times in my code.
On Fri, 10 Dec 2004 12:16:12 +0800, jaYPee <hi******@yahoo.com> wrote:
I have created 3 sqldataadapter. each adapter.selectcommand has a
parameter. I have added a textbox to supply a value for each
parameter. My problem is when I press enter the second time to fire up
the keypress event from the textbox I recieved this error in datagrid
object "ForeignKeyConstraint StudentsSchYrSem requires the child key
values (21000013) to exist in the parent table"

I'm wondering before if I change the value of that textbox only the
second time have an error.

The parameter is lastname.
example if I provide a value in the textbox the first time and press
enter i did not recieve an error. the second time i change the value
of a textbox gives me an error. after that no error has occur.

seems this is a very strange error to me.


Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Caroline | last post by:
I seem to always want to do this type of join, but I can never find how to do this. I am trying to join two tables. The parent table will always have one row of data and the child may have 0 to...
1
by: ahaideb | last post by:
I have a table (relation) in my database: --------------- | parent | child | --------------- | 1 | 2 | | 1 | 3 | | 2 | 4 | | 2 | 5 ...
13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
0
by: oj | last post by:
I have a dataset with a parent table and 3 child tables. The dataset is filled and manipulated on one particular web page. During the user interaction one of the child tables can have records...
1
by: David A. Osborn | last post by:
I keep getting the following message when adding a new record to a database that has two tables. On table is a parent to the other. I am adding a new parent record that has child records and I...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
13
by: dbuchanan | last post by:
Hello, Here is the error message; ---------------------------- Exception Message: ForeignKeyConstraint Lkp_tbl040Cmpt_lkp302SensorType requires the child key values (5) to exist in the...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.