By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

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

P: n/a
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_Co untryID);
r2.Nested = true;

May 15 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
if you are sure that both tables have unique value then you should check that
whether primary key is defined on tables or not.

"j-in-uk" wrote:
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_Co untryID);
r2.Nested = true;

May 15 '06 #2

P: n/a
Does it have anything to do with the fact that ADO.NET, by default, is
case INsensitive? Are the IDs strings?

May 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.