DataRelation- Setting up relation for table

  • Thread starter Thread starter Aryan
  • Start date Start date
A

Aryan

Hi,
I want to use DataRelation object for setting up relationship
between two different datatable, but i want to use multiple columns to
set up relation between two tables. For example.

DataRelation dRelationOrgInd = new DataRelation("OrgInd",
ds.Tables["OrgList"].Columns["iIDOrganization, iIDSeries"],
ds.Tables["IndList"].Columns["iIDOrganization, iIDSeries"], true);
dRelationOrgInd.Nested = true;
ds.Relations.Add(dRelationOrgInd);

I want to use something like this...I am using VB.NET 2.0

Please tell me how can i achieve the same.

Thanks in advance.

Regards,
Manoj Singh.
 
Thanks for reply,
I am sorry to say that, I am using C# .NET 2.0, it was unfortunate
to write VB.NET. So please tell me how can i achiave the same.

Thanks Again.
Manoj Singh.
 
I am sorry to say that, I am using C# .NET 2.0, it was unfortunate
to write VB.NET. So please tell me how can i achiave the same.

???

1) What do you actually have now?

2) What is the problem?

3) What are you trying to achieve?
 
Hi,
1> I am using C# 2.0
DataRelation dRelationOrgInd = new DataRelation("OrgInd",
ds.Tables["OrgList"].Columns["iIDOrganization"],
ds.Tables["IndList"].Columns["iIDOrganization"], true);
dRelationOrgInd.Nested = true;
ds.Relations.Add(dRelationOrgInd);
2> I am not able to setup multiple columns from each table to set up
relation between them, something like Composite key
3> I want to use muliple columns to set up relation in datarelation
object.

Tell me if you need any more clarification.

Thanks in advance,
Manoj Singh
 
Back
Top