Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataReleation Error!
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00751078
Message ID:
00752778
Views:
24
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform