ConstraintException occured
Posted: Thu 08 Feb 2007 11:33
Hey
So, I have insert into my project a DataSet through the DataSet Wizzard. - The DataSet has a master table with two relations.
I do the following code:
The problem is, that when I do first BrilleTableAdapter.Fill, then I get the error there. - And when I go ahead, everything works fine. - What can the problem be?
THX
So, I have insert into my project a DataSet through the DataSet Wizzard. - The DataSet has a master table with two relations.
I do the following code:
Code: Select all
Try
Me.KundenstammTableAdapter.Fill(Me.DtsÜbersicht.kundenstamm, KundenNr)
Catch ex As System.Exception
System.Windows.Forms.MessageBox.Show(ex.Message)
End Try
Me.DtsÜbersicht.EnforceConstraints = True
'TODO: This line of code loads data into the 'DtsÜbersicht.kontaktlinse' table. You can move, or remove it, as needed.
'Here I get the Error (ConstraintException occured)
Me.KontaktlinseTableAdapter.Fill(Me.DtsÜbersicht.kontaktlinse)
'TODO: This line of code loads data into the 'DtsÜbersicht.brille' table. You can move, or remove it, as needed.
Me.BrilleTableAdapter.Fill(Me.DtsÜbersicht.brille)
'TODO: This line of code loads data into the 'DtsÜbersicht.handelsware' table. You can move, or remove it, as needed.
Me.HandelswareTableAdapter.Fill(Me.DtsÜbersicht.handelsware)
THX