DataRelation- Setting up relation for table

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.
 
A

Aryan

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.
 
M

Mark Rae

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?
 
A

Aryan

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
 

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

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top