Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataReleation Error!
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00751078
Message ID:
00752778
Vues:
16
Hi Ahmad,

This is error occuring because your some records in your child table (Member) do not have a Nationality column that can be found in the Member table in the Code column. You can't have "orphaned" child records if you use relations.

>Hi All,
>
>I am getting this error :
>(Additional information: This constraint cannot be enabled as not all values have corresponding parent values.)
>
>And I’m creating this relation
>Dim relMemberNat As DataRelation
>relMemberNat = New DataRelation("MemNat", myDS.Tables("Nat").Columns("Code"), myDS.Tables("Member").Columns("Nationality"))
>myDS.Relations.Add(relMemberNat)
>
>- “Nat” table is the Nationalities list table with “Code” filed as PK
>- “Member” table is the Members data table with “Nationality” normal filed stors the "Code" value.
>
>Any idea please.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform