Datable relationship error "columns don't currently have unique values"

  • Thread starter Thread starter j-in-uk
  • Start date Start date
J

j-in-uk

Hi,

I seem to get the error on DataRelation r2, the values are unique so I
don't know why I am getting the error. Any sugesstions?

DataRelation r1 = ds.Relations.Add(dtContinent_ContinentID,
dtCountries_ContinentID);
r1.Nested = true;
DataRelation r2 =
ds.Relations.Add(dtCountries_CountryID,dtStates_CountryID);
r2.Nested = true;
 
if you are sure that both tables have unique value then you should check that
whether primary key is defined on tables or not.
 
Does it have anything to do with the fact that ADO.NET, by default, is
case INsensitive? Are the IDs strings?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top